Re: Color entire table view row
Re: Color entire table view row
- Subject: Re: Color entire table view row
- From: Ondra Cada <email@hidden>
- Date: Fri, 5 Apr 2002 11:49:54 +0200
On Friday, April 5, 2002, at 04:46 , Matt Massicotte wrote:
A question that *I* actually know the answer to! I'm happy to report
that I have implemented this myself quite effectively. I'm sure that it'
s not the best way to do it, so maybe some of the more experienced guys
can give us both a hand :)
What I did was subclass NSTableColumn and change the columns in IB to my
subclass. The actual subclass simply keeps an array of cells (instead of
one single data cell) and overrides the methods that interact with the
data cell.
In order to ensure that my column has the right number of cells, I adjust
the number of cells every time my datasource's numberOfRowsInTableView
method is called.
I am pretty sure this has to be at the very least twice, much probably
even more, as difficult as the plain usage of the
tableView:willDisplayCell:forTableColumn:row: delegate method (which is
actually designed directly for such things).
Nevertheless, of course use any way you like; the only reason I am writing
this is to discourage newbies who might read this to go the hard way, at
least unless they tried the simple one.
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
2K Development: email@hidden
http://www.2kdevelopment.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
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.