• 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
NSTableView changing background
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTableView changing background


  • Subject: NSTableView changing background
  • From: "Jay Rimalrick" <email@hidden>
  • Date: Thu, 18 Dec 2003 22:41:14 -0500

I am trying to change the color of an entire row of an NSTableView. I am using the delegate shown below to change the cell colors based on the row number. However, there are spaces between the cells that show the background color ... is there any way to color in a whole row?

- (void)tableView: (NSTableView *)aTableView willDisplayCell:(id)aCell
forTableColumn:(NSTableColumn *)TC row:(int)row
{
if ( (row % 2) == 0)
{
[aCell setDrawsBackground: YES];
[aCell setBackgroundColor:
[NSColor colorWithCalibratedRed: 0.9 green: 0.9 blue:1 alpha:
1.0]];
}
}




________________________________________________________________
Sent via the WebMail system at 1st.net
_______________________________________________
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 changing background
      • From: James Chen <email@hidden>
  • Prev by Date: Re: NSPopUpButton/NSMenu
  • Next by Date: NSButtonCell problem -- Title ends up at bottom
  • Previous by thread: Re: NSPopUpButton/NSMenu
  • Next by thread: Re: NSTableView changing background
  • Index(es):
    • Date
    • Thread