• 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
cell backgroundColor in OutlineView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cell backgroundColor in OutlineView


  • Subject: cell backgroundColor in OutlineView
  • From: Elisabeth Freeman <email@hidden>
  • Date: Mon, 4 Aug 2003 20:42:15 -0700

Hi,
I am trying to set the background color in a cell in an outline view.
When I do this, every cell in my column gets the background color, not
just the one cell I want.

NSTableColumn* tableColumn = [olv tableColumnWithIdentifier:
@"columnName"];
int row = [olv rowForItem:item];
ImageAndTextCell *cell = [tableColumn dataCellForRow:row];
[cell setDrawsBackground:YES];
[cell setBackgroundColor:[[[NSColor lightGrayColor]
colorUsingColorSpaceName:NSDeviceRGBColorSpace] retain]];

where ImageAndTextCell is a custom NSTextFieldCell. I know it's
getting the right row (I NSLog the row number and it's correct) and I
only have one column, so I'm not messing up the column...

Any suggestions would be much appreciated.

Elisabeth
_______________________________________________
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.

  • Prev by Date: Re: UNICODE problem - conversion creates ill characters _between_ written strings
  • Next by Date: BOM and UTF-8 (was Re: Question about line breaks and file types)
  • Previous by thread: Re: UNICODE problem - conversion creates ill characters _between_ written strings
  • Next by thread: Java in Panther
  • Index(es):
    • Date
    • Thread