Re: NSTableView && Custom Background ...
Re: NSTableView && Custom Background ...
- Subject: Re: NSTableView && Custom Background ...
- From: Stuart Malin <email@hidden>
- Date: Thu, 26 Feb 2009 21:25:01 -1000
On Feb 25, 2009, at 2:22 PM, Corbin Dunn wrote:
On Feb 25, 2009, at 2:58 PM, Mic Pringle wrote:
Hi,
I've a subclass of NSTableView that draws a custom gradient
background. What I'd like to do now is to draw a slightly different
background when the window containing the custom NSTableView loses
focus.
Is this possible ?
If so, could someone please point me in the right direction ?
I know that in the NSTableView subclass you can use [self window] to
get the containing window, so I have tried things like [[self window]
isKeyWindow] and [[self window] isMainWindow] but this doesn't seem
to
get me anywhere.
In addition to what Nick said, you probably aren't invalidating the
tableview when the window looses/gains key status.
What you want to do does work, and is possible; the
NSTableViewSourceListHighlightStyle does this automatically.
I believe that attribute is:
NSTableViewSelectionHighlightStyleSourceList,
and is set by invoking:
[tableObject
setSelectionHighlightStyle
:NSTableViewSelectionHighlightStyleSourceList];
_______________________________________________
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