Can NSCell draw both an icon and text?
Can NSCell draw both an icon and text?
- Subject: Can NSCell draw both an icon and text?
- From: James Bucanek <email@hidden>
- Date: Wed, 18 May 2005 07:30:07 -0700
Greetings,
I'm putting together an "object" browser using NSOutlineView. I'd like to display my objects with both an icon and a name -- a la the Finder's "List" view.
But, unlike Java's venerable JLabel object, NSCell appears to draw either an NSImage or some text -- but not both.
Searching the archives, it appears that my only choice is to subclass NSCell. Several years ago, URLs were posted to example code, but those URLs are all stale now.
So is this still the only/recommended way of accomplishing this? Does someone have some sample code that does this (I can't image that this hasn't been done a thousand times already)?
If I do subclass NSCell, how much of NSCell is functional -- or is the base class mostly a place holder for a class-cluster? I plan on needing other NSCell functionality (like selection highlighting), and I'd rather not have to re-implement all the behavior of the foundation class.
Thanks...
--
James Bucanek <mailto:email@hidden>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden