Forum Navigation
You need to log in to create posts and topics.

TableView: changing text color in a specific cell ( i.e. specific row/column )

Posted by: fblistserve <fblistserve@...>

Given: a tableview( cell-based ) with a delegate datasource implementation. Displayed data is all text, dates and numbers. This is all Objective-C with a nib.

My initial research indicates:


(void)tableView:(NSTableView *)aTableView willDisplayCell:(id)aCellforTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex

might be a potential candidate ( it is a NSTableView delegate method ) for changing the text color at a specific row/column.
My array processing filters out data( of the data source array for the tableview ) and also determines what data should have a different color before it does a [table reloadData] but the above method get control after the [table reloadData ]. I’m hesitant to put a lot of logic in the above delegate method to determine which data should be colored. Maybe adding a non-display piece of data to the data source array would be better?
OK, so what are my questions?
(1) has anyone used the above method to change the text in a table view cell or know if it is the right approach?
(2) other approaches or thoughts on the described approach for changing text color in a tableview?
I’m hoping to experiment with this tomorrow. TIA for any ideas.
Cheers,

Brian S.


To unsubscribe, e-mail: fbcocoa-unsubscribe@welovegod.org For additional commands, e-mail: fbcocoa-help@freegroups.net