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 protected])

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 [EMAIL PROTECTED]

Reply via email to