Re: Highlight color of a NSTableView row
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