• 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
Of Bindings, NSOutlineView, and custom row backgrounds
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Of Bindings, NSOutlineView, and custom row backgrounds


  • Subject: Of Bindings, NSOutlineView, and custom row backgrounds
  • From: John Clayton <email@hidden>
  • Date: Tue, 18 Apr 2006 23:28:13 -0700

Hi,

Let's say we've got an NSOutlineView bound to an NSTreeController and we want to draw a custom row background, not just when the row is selected, but all the time. Now we could do it by subclassing and overriding drawRow:clipRect:, true, and I think one could find out which row is being drawn in -drawBackgroundInClipRect: and use that. But, let's say different nodes in the tree need different backgrounds. Since what we've got is not our class but an instance of _NSArrayControllerTreeNode, it seems like it might be more elegant to use bindings to just set the damn row background. Is the only way to do this to expose a custom binding here? Can anyone point me in another direction?

Oh so grateful,
John






John Clayton --------------------------------------------------------------------- http://www.fivesquaresoftware.com email@hidden --------------------------------------------------------------------- CatSlapper - Manage and install multiple Tomcats



_______________________________________________
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


  • Prev by Date: Re: Animated Ripple Effect
  • Next by Date: Core Data SIGSEGV when opening an existing document
  • Previous by thread: Re: Drawing order (was: Re: Any tricks to dragging an NSTableView?)
  • Next by thread: Core Data SIGSEGV when opening an existing document
  • Index(es):
    • Date
    • Thread