Re: Can NSCell draw both an icon and text?
Re: Can NSCell draw both an icon and text?
- Subject: Re: Can NSCell draw both an icon and text?
- From: j o a r <email@hidden>
- Date: Wed, 18 May 2005 16:33:13 +0200
Why not simply use a NSButtonCell?
j o a r
On 18 maj 2005, at 16.30, James Bucanek wrote:
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.
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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