• 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
Re: NSTableView text color of cells in highlighted rows unreadable
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView text color of cells in highlighted rows unreadable


  • Subject: Re: NSTableView text color of cells in highlighted rows unreadable
  • From: Corbin Dunn <email@hidden>
  • Date: Tue, 11 Nov 2008 10:55:07 -0800


On Nov 11, 2008, at 12:40 AM, Alexander Reichstadt wrote:

Hi,

I am trying to turn off the highlight color. I subclassed NSTableView and NSTextAttachmentCell. In my tv-subclass I override - (void)highlightSelectionInClipRect:(NSRect)theClipRect and use clearColor to draw the selected rows which works.

Instead of doing that, just don't call super, and have the method be empty.


But I haven't found the way to draw the text in black regardless of the row's hightlight-state, so it continues to write the cell content in white on a white background whenever it's highlighted.

Override -preparedCellAtColumn:row:, call super, and on the resulting cell call setBackgroundStyle:NSBackgroundStyleLight. Or, alternatively, in the cell subclass have the -interiorBackgroundStyle always return NSBackgroundStyleLight.


In your cell subclass, override -highlightColor:withFrame: and return nil.

corbin
_______________________________________________

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


References: 
 >NSTableView text color of cells in highlighted rows unreadable (From: Alexander Reichstadt <email@hidden>)

  • Prev by Date: Re: Play/Pause, rew/ff keys ...
  • Next by Date: Re: Play/Pause, rew/ff keys ...
  • Previous by thread: NSTableView text color of cells in highlighted rows unreadable
  • Next by thread: Information request on Iphone for playing pls files
  • Index(es):
    • Date
    • Thread