- outlineView:willDisplayCell:forTableColumn:item: and selected item
- outlineView:willDisplayCell:forTableColumn:item: and selected item
- Subject: - outlineView:willDisplayCell:forTableColumn:item: and selected item
- From: John Stiles <email@hidden>
- Date: Mon, 25 Feb 2008 17:12:52 -0800
In my outline view, I'm using an NSTextFieldCell and setting the item's
color via setTextColor:.
This works fine, but for some colors, it's almost impossible to see when
the item is selected. I'd like to always make the text white if the item
is selected.
In Leopard, I know I can use [cell backgroundStyle] ==
NSBackgroundStyleDark to check this, but I was wondering if there is any
easy check for Tiger and below. I can actually go through the
machinations of asking the outline view if the item is selected, but it
seems a lot more heavyweight. You have to do:
[[outlineView selectedRowIndexes] containsIndex:[outlineView
rowForItem:item]]
And I'm not sure just how fast that is, but it can't be as fast as just
asking the cell "are you selected" :)
_______________________________________________
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