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 (Cocoa-dev@lists.apple.com)

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