• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: selected table row color ala itunes ? [2]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >selected table row color ala itunes ? (From: Thierry Bucco <email@hidden>)
 >selected table row color ala itunes ? [2] (From: Thierry Bucco <email@hidden>)

  • Prev by Date: Re: Using invocation forwarding
  • Next by Date: Re: Using custom NSValueTransformer objects in single-window applications
  • Previous by thread: selected table row color ala itunes ? [2]
  • Next by thread: Re: selected table row color ala itunes ? [2]
  • Index(es):
    • Date
    • Thread