views:

473

answers:

3

I have NSTableView in my application. right now say is 8 columns by 48 rows.

I have a function that runs a specific a specific column to see wether or not the value in each cell is greater than a certain value. If it is I would like the application to highlight the row.

I did some reading and I am still looking for the functions calls or a process that will let me extract the cells/rows/or rect and let me change the color.

if you can tell me the functions and the steps in changing the color of the cells I would greatly appreciated it.

A: 

Set a tableView delegate and implement the

– tableView:dataCellForTableColumn:row:

method. Then write a custom dataCell class to do the custom drawing.

Matthieu Cormier
ReachConnection
+2  A: 
- [NSTableView selectRowIndexes:byExendingSelection:]

Source

RJ
okay, it looks i m going to implement my solutions with this. I am going to set the preference so that the user doesn't have the ability to select rows, and I will use this function to select data points in the table that exceeds my condition parameters
ReachConnection
A: 

If you extract the data as strings, you can use :-

NSAttributedString

to change the colour of both text and background.

Frank