• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
  • Follow-Ups:
    • Re: NSTableView
      • From: mmalcolm crawford <email@hidden>
References: 
 >Re: NSTableView (From: mmalcolm crawford <email@hidden>)

  • Prev by Date: NSOutlineView: multi-line entries (i.e. soft wrapped)
  • Next by Date: Re: NSTableView
  • Previous by thread: Re: NSTableView
  • Next by thread: Re: NSTableView
  • Index(es):
    • Date
    • Thread