Re: [NSTableview] can't make selected text stay black
Re: [NSTableview] can't make selected text stay black
- Subject: Re: [NSTableview] can't make selected text stay black
- From: Matt Neuburg <email@hidden>
- Date: Sat, 06 Mar 2010 10:16:30 -0800
- Thread-topic: [NSTableview] can't make selected text stay black
On Fri, 5 Mar 2010 12:25:05 -1000, Kent Hauser <email@hidden> said:
>Hi,
>
>I'm trying to make a NSTableView selected row not look selected. I
>subclassed NSTableView & added the following class & delegate methods:
>
>// remove selection indication
>- (void)highlightSelectionInClipRect:(NSRect)clipRect
>{
> NSLog (@"%s", __FUNCTION__);
>}
>
>// change selected cell text color (delegate method)
>- (void)tableView:(NSTableView *)tableView willDisplayCell:(id)cell
>forTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)rowIndex
>{
> NSLog (@"%s", __FUNCTION__);
> if ([cell respondsToSelector:@selector(setTextColor:)])
> [(id)cell setTextColor:[NSColor blackColor]];
>}
>
>While the "hightlightSelection" method does it's job, my delegate method
>doesn't paint the text black. (However, if I use redColor, I get red text).
>
>What am I missing?
I haven't tried this, and so could be mistaken, but I have a sneaking
suspicion that you're going to want to subclass NSCell... m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
http://www.tidbits.com/matt/default.html#applescriptthings
_______________________________________________
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