removing selection-highlight from NSTableView
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 ?!