Re: Embedding a color item in an NSTableView
Re: Embedding a color item in an NSTableView
- Subject: Re: Embedding a color item in an NSTableView
- From: Steven Spencer <email@hidden>
- Date: Wed, 14 Jun 2006 12:57:45 +0100
Something like this ?
Can be modified to return a color for an individual column and row location.
Unsure if this will work with CoreData.
- (void)tableView:(NSTableView *)aTableView
willDisplayCell:(id)aCell
forTableColumn:(NSTableColumn *)aTableColumn
row:(int)rowIndex
{
if ([[aTableColumn identifier] isEqual:@"type"]) {
[aCell setDrawsBackground: YES];
[aCell setBackgroundColor: [NSColor redColor]];
return;
}
[aCell setDrawsBackground: NO];
}
- Steve
_______________________________________________
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