Platforms to show: All Mac Windows Linux Cross-Platform
/Picture/Icon/Folderitem Icon Example
Required plugins for this example: MBS Picture Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Picture/Icon/Folderitem Icon Example
This example is the version from Sun, 4th Aug 2012.
Project "Folderitem Icon Example.xojo_binary_project"
FileTypes
Filetype special/any
End FileTypes
Class Window1 Inherits Window
Control PushButton1 Inherits PushButton
ControlInstance PushButton1 Inherits PushButton
EventHandler Sub Action()
dim f as folderItem
f=getopenFolderItem("special/any")
if f<>Nil then
file=f
Refresh
end if
End EventHandler
End Control
Control PushButton2 Inherits PushButton
ControlInstance PushButton2 Inherits PushButton
EventHandler Sub Action()
file=nil
backdrop=nil
refresh
End EventHandler
End Control
EventHandler Sub Paint(g As Graphics)
dim p as Picture
if file<>nil then
// get icon image and mask
p=file.IconMBS(Width)
if p<>Nil then
g.DrawPicture p,0,0
end if
end if
End EventHandler
EventHandler Sub Resized()
Refresh
End EventHandler
EventHandler Sub Resizing()
Refresh
End EventHandler
Property file As folderItem
End Class
MenuBar Menu
MenuItem UntitledMenu3 = ""
MenuItem UntitledMenu2 = "File"
MenuItem FileQuit = "Quit"
MenuItem UntitledMenu0 = "Edit"
MenuItem EditUndo = "Undo"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "Cut"
MenuItem EditCopy = "Copy"
MenuItem EditPaste = "Paste"
MenuItem EditClear = "Clear"
End MenuBar
Class App Inherits Application
End Class
End Project
The items on this page are in the following plugins: MBS Picture Plugin.