Using drawRow? Drawing over cells...
Using drawRow? Drawing over cells...
- Subject: Using drawRow? Drawing over cells...
- From: Oliver Cameron <email@hidden>
- Date: Tue, 18 Jan 2005 21:46:35 +0000
Hi guys,
I would like to use drawRow: clipRect: in a table view subclass, and
have got it working to a certain degree. Just for test purposes I have
done this (found from some other code on the list):
- (void)drawRow:(int)row clipRect:(NSRect)frame
{
if ([self isRowSelected:row])
{
NSColor *bgColor = [NSColor blueColor];
if (bgColor != nil)
{
NSRect r = [self rectOfRow:row];
[bgColor set];
NSRectFill(NSIntersectionRect(r, frame));
}
}
else
[super drawRow:row clipRect:frame];
}
This makes the selected row blue, but as a side effect it seems, it
draws the blue OVER my table view content, so all I can see is just the
blue row and no text or anything in my data source.
Any ideas appreciated,
Oliver
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden