Forum breadcrumbs - You are here:WeLoveGod RallysPublic Forums: fbcocoaTableView: changing text color in …
You need to log in to create posts and topics.
TableView: changing text color in a specific cell ( i.e. specific row/column )
1,678 Posts
#1 · September 22, 2012, 8:21 pm
Quote from Forum Archives on September 22, 2012, 8:21 pmPosted 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)rowIndexmight 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
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
Click for thumbs down.0Click for thumbs up.0