On Aug 8, 2009, at 08:30, Joshua Garnham wrote:

I am looking for some code to make the root object's in an outline view have a different background color to the other rows. I am pretty sure I need to sub-class the outline view but I don't know what code to add to the sub-class to do what I want it to do (which is what I described above).

There shouldn't be any need to subclass the outline view -- you will most likely be able to set the desired background color in outlineView:willDisplayCell:forTableColumn:item: (and/or outlineView:willDisplayOutlineCell:forTableColumn:item:).

Another possibility, if it's important that the top level object rows need to look different but it's not crucial that you use a specific background color, is to implement outlineView:isGroupItem: (another delegate method), which gives group rows a distinctive look.



_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to