• 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: Highlight color of a NSTableView row
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Highlight color of a NSTableView row


  • Subject: Re: Highlight color of a NSTableView row
  • From: Cathy Shive <email@hidden>
  • Date: Thu, 10 Apr 2008 12:00:17 +0200

If you're targeting Leopard, there is an NSTableView method you can override for this (a public one!)

-(void)highlightSelectionInClipRect:(NSRect)theClipRect

You have to actually draw the highlights, it's not simply a matter of setting the color. If you look at the post Ben linked to, there is sample code you can download that will show you what to do.

If you're targeting anything before Leopard, you can do the same, but there is the issue that the table view is going to draw over your drawing anyway. This is the weirdest bug ever in my opinion. This is also discussed in the post and later in the comments by John.

Hopefully, you're just dealing with Leopard and you can avoid the ugliness of this bug.

Good luck!
Cathy


On Apr 10, 2008, at 7:55 AM, Ben Lachman wrote:

Look at:

http://katidev.com/blog/2008/02/22/styling-an-nstableview-dttah/

but make sure you read the comments. John Randolph's comments are worth considering.

->Ben

--
Ben Lachman
Acacia Tree Software

http://acaciatreesoftware.com

email@hidden
740.590.0009



On Apr 10, 2008, at 12:27 AM, Eric Gorr wrote:
I've got a NSTableView and when I select a row, it is highlighted with the color specified in the Appearance System Preference panel.

Is there a way to take control over what color gets used to highlight a row when selected?

I need to be able to set the highlight color used based on what row in the table is selected.
_______________________________________________

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

_______________________________________________

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: Highlight color of a NSTableView row
      • From: Eric Gorr <email@hidden>
References: 
 >Highlight color of a NSTableView row (From: Eric Gorr <email@hidden>)
 >Re: Highlight color of a NSTableView row (From: Ben Lachman <email@hidden>)

  • Prev by Date: Re: Xcode editor question
  • Next by Date: Re: core data and IB outlet binding
  • Previous by thread: Re: Highlight color of a NSTableView row
  • Next by thread: Re: Highlight color of a NSTableView row
  • Index(es):
    • Date
    • Thread