Re: NSTableView text color of cells in highlighted rows unreadable
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