Of Bindings, NSOutlineView, and custom row backgrounds
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