I’ve been digging for a way to add a custom folder to a newly created folder:
Try
lfolder = SpecialFolder.Documents.Child("Transfer Logs")
If lfolder = Nil Or Not lFolder.Exists Then
lfolder.CreateFolder
End If
Catch e As IOError
...
End Try
Is there a way to add a folder icon for the three platforms at this point?
The Example project is in the MBS-Xojo-Plugins222\Examples\Picture\Icon folder and is called Folderitem Icon Example.xojo_binary_project but it didn’t do what I expected when I tried it on Windows. When I opened a png file it gave me the Photoshop icon. The DropFile to see icon.xojo_binary_project did something similar. It appears to only show the icon of the application that the image file that it was associated with.
shared method setIcon(image as NSImageMBS, file as folderitem, flags as Integer = 0) as boolean
shared method setIcon(image as NSImageMBS, path as string, flags as Integer = 0) as boolean
For Windows and Linux, you may need to do differently.
e.g. on Windows you can make a shortcut file to the folder and then include an icon.
See WindowsShortCutMBS class.