• 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: Embedding a color item in an NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Canceling the insertion of a managed object
  • Next by Date: Animating NSImageCells
  • Previous by thread: Re: Embedding a color item in an NSTableView
  • Next by thread: Difference in relationships storage between various storage options (CoreData)
  • Index(es):
    • Date
    • Thread