Re: Color entire table view row
Re: Color entire table view row
- Subject: Re: Color entire table view row
- From: Matt Massicotte <email@hidden>
- Date: Thu, 4 Apr 2002 21:46:24 -0500
Finally!
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.
Now, you can set the text color of the cells to your heart's content.
This works rather well for me (although I have noticed that if you have
multiple columns, and you only change one to your subclass, other rows
get colorized and I'm not sure why)
So, I hope this points you in the right direction
Matt Massicotte
_______________________________________________
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.