• 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
removing selection-highlight from NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

removing selection-highlight from NSTableView


  • Subject: removing selection-highlight from NSTableView
  • From: Gore <email@hidden>
  • Date: Wed, 23 Jan 2002 22:19:38 +0200

I would like to remove the highlight color when selecting a item in a NSTableView, my subclass code looks like this, but the orginal highlight is drawn too...

- (void)drawRow:(int)row clipRect:(NSRect)rect
{
if ( [self isRowSelected: row] )
[[NSColor redColor] set];

[[NSBezierPath bezierPathWithRect: [self rectOfRow: row]] fill];

// to draw the item content...but the highlight is drawn too!
[super drawRow: row clipRect: rect];
}

I must use [super drawRow: row clipRect: rect]; so that the content of the rows are drawn too, but that draws the highlight thingy too I think, hmmm...I've tryed using [self setNeedsUpdate: YES]; instead of the super-call but doesn't work. Is there a good way to do this ?
The most logical solution must be to somehow refresh the content, but how ?!


  • Prev by Date: Re: Exceptions never reach my uncaught exception handler
  • Next by Date: how to determine when [window windowNumber] is available
  • Previous by thread: Re: Exceptions never reach my uncaught exception handler
  • Next by thread: Re: removing selection-highlight from NSTableView
  • Index(es):
    • Date
    • Thread