On Mar 8, 2010, at 3:15 PM, Kent Hauser wrote:

> 
> 
> On Mon, Mar 8, 2010 at 12:20 PM, Corbin Dunn <corb...@apple.com> wrote:
> 
> On Mar 5, 2010, at 2:25 PM, Kent Hauser wrote:
> 
> > Hi,
> >
> > I'm trying to make a NSTableView selected row not look selected. I
> > subclassed NSTableView & added the following class & delegate methods:
> >
> 
> 
> How about this: [tableView 
> setSelectionHighlightStyle:NSTableViewSelectionHighlightStyleNone] ?
> 
> --corbin
> 
> 
> 
> This is exactly what I want -- but it's SL only. I've been trying to find a 
> 10.5 solution as well. But NSTextFieldCell seems determined to hightlight 
> itself (bold & white) no matter how I ask it not to.  Any help would be 
> greatly appreciated.

Ahh -- it is always good to post your target OS. I tend to assume everyone is 
using the latest and greatest.

it's pretty easy:

1. Override highlightSelectionInClipRect and do nothing
2. in willDisplayCell, on the cell, call setHighlighted:NO and 
setBackgroundStyle:NSBackgroundStyleLight

That should be it.

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 arch...@mail-archive.com

Reply via email to