Re: NSTableView
Re: NSTableView
- Subject: Re: NSTableView
- From: Allan Odgaard <email@hidden>
- Date: Mon, 27 May 2002 21:52:40 +0200
On mandag, maj 27, 2002, at 08:29 , mmalcolm crawford 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 [...]
[...] you could use:
- (void)tableView:(NSTableView *)tableView willDisplayCell:(id)cell
forTableColumn:(NSTableColumn *)tableColumn row:(int)row
It has already been answered, but IMHO the nice solution is simply to
return an NSAttributedString which contain the colour code.
In my application each record is an NSDictionary with keys matching the
tableheader identifiers, the objects are NSString, NSAttributedString
and NSImage -- this should remove the need to overwrite methods...
_______________________________________________
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.