Re: selected table row color ala itunes ? [2]
Re: selected table row color ala itunes ? [2]
- Subject: Re: selected table row color ala itunes ? [2]
- From: Jonathan Wight <email@hidden>
- Date: Tue, 16 Dec 2003 11:44:58 -0600
You might try calling super's drawRow:clipRect: method before you do
you drawing. I'm guessing it draws over your green rectangle...
- (void)drawRow:(int)row clipRect:(NSRect)rect
{
[super drawRow:row clipRect:rect];
[[NSColor greenColor] set];
[NSBezierPath fillRect:[self rectOfRow:row]];
}
Jon.
On Dec 16, 2003, at 11:16, Thierry Bucco wrote:
>
Maybe I didn't explained what I want clearly enough, because of my
>
english...
>
>
I want to replace the selection color by a shaded one.
>
>
When I select a cell, the color of the selection is blue (on my mac),
>
what I want is to change the foreground color (selection color) by a
>
blue shaded like in iTunes.
>
>
In iTunes, when an album is selected, the cell is drawn with a blue
>
shaded.
>
I want to do the same thing, not to draw alternate backgound color for
>
the table view background.
>
>
I am using this piece of code in a NSTableView subclass provided by
>
fabian :
>
>
- (void)drawRow:(int)row clipRect:(NSRect)rect
>
{
>
[[NSColor greenColor] set];
>
[NSBezierPath fillRect:[self rectOfRow:row]];
>
[super drawRow:row clipRect:rect];
>
}
>
>
but I draw only the background not the selection color.
>
>
Thanks to all for your help.
>
>
thierry
>
iconless.com
>
>
--
>
From March, I will be in Montreal-Canada (as a permanent resident), if
>
you know a cool MacOS X company which is looking for a cool MacOS X
>
developer, please send me an email...
>
>
http://www.iconless.com/site/aboutme/resume.html
>
--
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.