Re: NSOutlineView with NSImage and NSStrings
Re: NSOutlineView with NSImage and NSStrings
- Subject: Re: NSOutlineView with NSImage and NSStrings
- From: Corbin Dunn <email@hidden>
- Date: Mon, 04 May 2009 12:11:46 -0700
On May 1, 2009, at 2:59 PM, iseecolors wrote:
I would like to have an image and a string together in my
NSOutlineView, but it is not clear to me how to do this. Basically
I want to do what iTunes appears to do (icons in front of the text
descriptors).
My initial thought was to return and NSArray that contains and
NSImage and NSString from the method:
- (id)outlineView:(NSOutlineView *)outlineView
objectValueForTableColumn:(NSTableColumn *)tableColumn byItem:(id)item
But apparently the returned id is just converted to an NSString. (if
it only deals with strings, why support id?)
Is there support for this built in to do this, or will I need to
subclass NSOutlineView and override the drawRect method?
Look at the PhotoSearch example on the developer site.
corbin
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden