• 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: ColoredRowTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ColoredRowTableView


  • Subject: Re: ColoredRowTableView
  • From: Jeremy Dronfield <email@hidden>
  • Date: Wed, 16 Oct 2002 17:50:00 +0100

On Tuesday, October 15, 2002, at 09:09 pm, j o a r wrote:

Don't use that method - it will only color the parts of the table view covered by rows, and a table view often contains fewer rows than the table is high leaving an unsightly white area below the last row. Simply use the other method mentioned in this thread, all it requires is a very slim subclass to NSTableView - and it works for image cells.

j o a r

On Tuesday, Oct 15, 2002, at 21:47 Europe/Stockholm, Jeremy Dronfield wrote:

Is there a way to do this if the data cell for one of the table columns is an NSImageCell?

Thanks. (I missed part of the thread.) I presume you mean the MP3 Player sample. I've now adapted the table view subclass from it, and it works as advertised. For the record, I found I had to put in the following delegate method:

- (void)tableView:(NSTableView *)aTableView willDisplayCell:(id)aCell forTableColumn:(NSTableColumn *)aTableColumn row:(int)aRowIndex
{
if (![aCell isKindOfClass:[NSImageCell class]]) {
[aCell setDrawsBackground:NO];
}
}

Without this, text cells in the table view draw a white background behind their text, covering their stripes. (Since I missed part of this thread, I don't know whether anyone else has mentioned this. Apologies if they have.)
-Jeremy

========================================
email@hidden // email@hidden
The Alchemy Pages:
- fractious fiction at http://freespace.virgin.net/jeremy.dronfield
========================================
_______________________________________________
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: 
 >Re: ColoredRowTableView (From: j o a r <email@hidden>)

  • Prev by Date: A CFStringRef that throws EXC_BAD_ACCESS
  • Next by Date: Re: non-live window resizing
  • Previous by thread: Re: ColoredRowTableView
  • Next by thread: Mac programming contract work
  • Index(es):
    • Date
    • Thread