Re: NSBrowser cell highlighting
Re: NSBrowser cell highlighting
- Subject: Re: NSBrowser cell highlighting
- From: Chuck Pisula <email@hidden>
- Date: Wed, 6 Jun 2001 10:26:50 -0700
This is new, and is in the release notes:
NSBrowserCell
Selected cells in a browser's last column draw with a slightly darker
color than the rest of the browsers columns. Since it can be problematic
for cells to know what color their highlight should be, a new method has
been introduce in NSBrowserCell to help determine the highlight color that
should be used. The method's controlView parameter will generally be the
forwarded parameter of the same name from methods like
drawInteriorWithFrame:inView:
- (NSColor *)highlightColorInView:(NSView *)controlView;
So, in your subclass, if [self isHighlighted], use [[self
highlightColorInView:v] set], otherwise use your background color.
-chuck
On Tuesday, June 5, 2001, at 04:45 PM, Tom Waters wrote:
>
I have a custom cell inside of an NSBrowser.
>
>
I note that when I use regular NSBrowserCells, the selected branch nodes
>
are painted in a lighter color when they aren't in the "right-most"
>
column.
>
>
I've been examining [NSCell isHighlighted] and [NSCell state] for clues
>
as to how the cell "knows" to paint this lighter color without success.
>
>
Does anyone know what the convention is?
>
>
(This is the kind of thing that is missing from the documentation,
>
because as everyone knows, you're NOT supposed to have to subclass
>
anything in cocoa...)
>
>
-tw
>
>
"Patient: Doctor, it hurts when I do this...
>
Doctor: Don't do that!"
>
_______________________________________________
>
cocoa-dev mailing list
>
email@hidden
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev