• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Can NSCell draw both an icon and text?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Can NSCell draw both an icon and text?
      • From: Nick Zitzmann <email@hidden>
    • Re: Can NSCell draw both an icon and text?
      • From: j o a r <email@hidden>
  • Prev by Date: Re: Cocoa Bindings & GUI question
  • Next by Date: Re: Can NSCell draw both an icon and text?
  • Previous by thread: Re: CIImage - saving the file?
  • Next by thread: Re: Can NSCell draw both an icon and text?
  • Index(es):
    • Date
    • Thread