• 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
NSBrowserCell not extensible; need sample using NSButtonCell
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSBrowserCell not extensible; need sample using NSButtonCell


  • Subject: NSBrowserCell not extensible; need sample using NSButtonCell
  • From: James Bucanek <email@hidden>
  • Date: Thu, 20 Jul 2006 09:53:51 -0700

Here's my problem,

I have several NSOutlineViews that use NSBrowserCell to display file icons and names. I've already hacked up some subclasses of NSBrowserCell to draw icons+filenames, dim the text, another other stuff that NSBrowserCell doesn't normally do.

However, I'm hitting the wall: I need to draw things in the background (think FInder labels), do more elaborate selection indication, and eventually add animation. But the NSBrowserCell class just wasn't built to be extended. The only choice I see is to roll my own and replace NSBrowserCell entirely. Here are my questions:

The big deal will be getting the disclosure controls to work the same way they do in NSBrowserCell. I've looked at Joar's code on placing NSViews into a NSTable <http://www.stepwise.com/Articles/Technical/2003-12-20.01.html>, but that sounds very heavy handed or the disclosure triangle -- I don't want to add thousands of NSButton views to my table. I would assume that NSBrowserCell uses a single NSButtonCell to draw and animate all of the "buttons" in the table, but I have no idea how to use an NSCell to "fake" a button display. Does anyone have sample code that does this?

Does anyone know how NSOutlineView handles the indenting of items in the column that controls the outline?

Eventually, I also want to add progress views to the outline. I know that these can't be lightweight NSCell renderings because they have their own animation, but I can use Joar's technique (or a variation on it) to accomplish that.

--
James Bucanek
 _______________________________________________
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: NSBrowserCell not extensible; need sample using NSButtonCell
      • From: Corbin Dunn <email@hidden>
  • Prev by Date: Re: Attributed strings and custom attributes
  • Next by Date: How do you use NSTextView methods on a NSView ? (keywords: TextEdit, sort lines)
  • Previous by thread: Re: read com.apple.mail.plist
  • Next by thread: Re: NSBrowserCell not extensible; need sample using NSButtonCell
  • Index(es):
    • Date
    • Thread