Re: NSTableView
Re: NSTableView
- Subject: Re: NSTableView
- From: mmalcolm crawford <email@hidden>
- Date: Sun, 26 May 2002 23:29:51 -0700
On Sunday, May 26, 2002, at 10:51 PM, Brendan Younger wrote:
If I had a table that had a list of names in it and I wanted all the
names that contained a 'd' to appear red instead of black like the
rest of the names.
You have to supply your own NSCell subclass which will then color the
names however you want. See the DragNDropOutlineView (in the Examples
directory of the dev tools installation) for an example of how to do
this.
This generally turns out not to be the case.
The default cell is likely to be an NSTextFieldCell, so you could use:
- (void)tableView:(NSTableView *)tableView
willDisplayCell:(id)cell
forTableColumn:(NSTableColumn *)tableColumn row:(int)row
{
if (<test>) {
[cell setTextColor:[NSColor redColor]];
}
}
mmalc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.