• 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: Alternating row colors in a table view?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Alternating row colors in a table view?


  • Subject: Re: Alternating row colors in a table view?
  • From: Jerry LeVan <email@hidden>
  • Date: Tue, 24 Feb 2004 13:37:50 -0500

After a bit of experimentation....

1) Create the table with *one* column with alternating colors selected in IB.
2) As columns are added to the table while the program is running
set the column to not draw the backgound.
[[aTableColumn dataCell] setDrawsBackground:NO];

The first column seem to not have the "losing the background" problem.

--Jerry

On Feb 24, 2004, at 11:24 AM, j o a r wrote:

It has been discussed on the mailing lists a couple of times, but can probably be difficult to find in the archives.

It's most likely a bug, so I wouldn't expect it to be documented by Apple.

I wouldn't do it in the "objectValueForTableColumn:" method. Doing it in "awakeFromNib" should suffice (I hope), and in that case it's only done once per column - not every time a cell in the column is redrawn.

j o a r

On 2004-02-24, at 17.07, Jerry LeVan wrote:

Thanks, that certainly did the trick!, I tried mamasan and google...Is this
documented somewere?
_______________________________________________
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.

References: 
 >Alternating row colors in a table view? (From: Jerry LeVan <email@hidden>)
 >Re: Alternating row colors in a table view? (From: Robert Martin <email@hidden>)
 >Re: Alternating row colors in a table view? (From: Jerry LeVan <email@hidden>)
 >Re: Alternating row colors in a table view? (From: j o a r <email@hidden>)

  • Prev by Date: Re: Check for 10.2 incompatibilities in XCode
  • Next by Date: showing a sheet on run?
  • Previous by thread: Re: Alternating row colors in a table view?
  • Next by thread: Colored pill-shape background in NSTableView row
  • Index(es):
    • Date
    • Thread