• 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: NSBrowser cell highlighting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSBrowser cell highlighting
      • From: Tom Waters <email@hidden>
References: 
 >NSBrowser cell highlighting (From: Tom Waters <email@hidden>)

  • Prev by Date: Re: Is This Right?
  • Next by Date: Re: learning OpenGL
  • Previous by thread: NSBrowser cell highlighting
  • Next by thread: Re: NSBrowser cell highlighting
  • Index(es):
    • Date
    • Thread