• 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
+[NSColor highlightColor] returns white instead of actual color
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

+[NSColor highlightColor] returns white instead of actual color


  • Subject: +[NSColor highlightColor] returns white instead of actual color
  • From: Jerry Krinock <email@hidden>
  • Date: Sat, 31 Jan 2009 23:11:03 -0800

I'm overriding -[NSTableView highlightSelectionInClipRect:] because I don't want all the columns of the selected row to be highlighted. Works fine except +[NSColor highlightColor] returns white instead of actual highlight color I have set in System Preferences > Appearance, which is green.

Here's the code:

color = [NSColor highlightColor] ;
color = [color colorUsingColorSpaceName:@"NSDeviceRGBColorSpace"] ;
NSLog(@"highlight color = %0.2f %0.2f %0.2f %0.2f",
         [color redComponent],
         [color greenComponent],
         [color blueComponent],
         [color alphaComponent]) ;

Here's the console output:

highlight color = 1.00 1.00 1.00 1.00

{1,1,1,1} is solid white, not green.  What am I doing wrong?

Thank you,

Jerry Krinock

_______________________________________________

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


  • Follow-Ups:
    • Re: +[NSColor highlightColor] returns white instead of actual color
      • From: "Stephen J. Butler" <email@hidden>
  • Prev by Date: Re: maximum theoretical speedup with dual quad processors
  • Next by Date: Re: +[NSColor highlightColor] returns white instead of actual color
  • Previous by thread: Drawing Invalidation Question
  • Next by thread: Re: +[NSColor highlightColor] returns white instead of actual color
  • Index(es):
    • Date
    • Thread