NSButtonCell visibility binding in NSOutlineView
NSButtonCell visibility binding in NSOutlineView
- Subject: NSButtonCell visibility binding in NSOutlineView
- From: Chris Tracewell <email@hidden>
- Date: Tue, 28 Apr 2009 10:12:40 -0700
I am looking for the best method of turning off the visibility of an
NSButtonCell object for individual rows in an OutlineView/TableView. I
have an OutlineView that is bound to a TreeController. There are two
columns. In the last column I am using a checkbox cell that should
only be visible to the user when a representedObject in the
TreeController has a certain property value. There is no Visibility
binding only Enabled which does not hide the control but just dims it.
I am using bindings to return a custom image for setImage and
setAlternateImage to display a custom NSImage instead of the regular
checkbox. It works nicely. I tried using conditional logic to return a
transparent image when I want to hide the control but that affects the
entire column. If I need to subclass I am suspecting I need to
override NSTableColumn's dataCellForRow, but then how do I obtain the
representedObject for that row?
Thanks for any help
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden