• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
- outlineView:willDisplayCell:forTableColumn:item: and selected item
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

- 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


  • Follow-Ups:
    • Re: - outlineView:willDisplayCell:forTableColumn:item: and selected item
      • From: "Ken Ferry" <email@hidden>
  • Prev by Date: Re: Table column index
  • Next by Date: Failed to capture Key Equivalent on Mac 10.4 but Succeeded on Mac 10.5
  • Previous by thread: Re: NSTreeController with Garbage Collection without CoreData causes problems
  • Next by thread: Re: - outlineView:willDisplayCell:forTableColumn:item: and selected item
  • Index(es):
    • Date
    • Thread