Re: NSTableView - Alternating blue and white background
Re: NSTableView - Alternating blue and white background
- Subject: Re: NSTableView - Alternating blue and white background
- From: j o a r <email@hidden>
- Date: Tue, 17 Dec 2002 11:38:02 +0100
You should not attempt to do it this way, because it will only draw the
background on existing rows - i.e. if you have a table view that is 10
rows high, but currently only two rows in it, then it will only paint
the custom colors on those first two rows.
The sample code from Apple will make sure that the table is properly
set up with the striped background for all visible rows in the table
view, regardless of whether they are currently populated with data or
not.
j o a r
On Tuesday, Dec 17, 2002, at 11:03 Europe/Stockholm,
email@hidden wrote:
You need to implement the tableviews delegate method -
- (void)tableView:(NSTableView *)aTableView willDisplayCell:(id)aCell
forTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex
you change the properties of the cell that is about to be drawn there
.
Search the archives on this topic, theres quite a few snazzy code
snippets for doing stuff like this.
_______________________________________________
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.