Is there any way to show images in an outline view?
How can I load images into the cells in an outline view, along with the text, such as the document and folder icons we see next to the names in the outline view in the Finder, or the mailbox icons next to the mailbox names in the outline view we see in Mail, etc?
I can load images into an image cell in a table view, by basically:
set contents of data cell 1 in data row 2 in data source of table view "MyTableView" to (load image "MyImage")
The dictionary shows that a cell in a table or outline view has an image property. I’m concluding that I can only access the properties of cell via the “will display item cell” handler, which won’t be called if the outline has a data source. I tried modifying the “Outline” example project by adding a “will display item cell” handler:
property testImage : null
on launched theObject
-- other stuff here
set testImage to load image "Minus" -- an image file I added to the project
end launched
on will display item cell theObject cell theCell table column tableColumn outline item outlineItem
tell theCell
set bordered to true
set image of it to testImage
end tell
end will display item cell
Te “set bordered” works, but the “set image” gives an error “AppleEvent handler failed. (-10000)”.
Is there any way to show images in an outline view?
Thanks,
Tom
BareFeet