LabWindows/CVI Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
OVR_CZ

Add SetTableCellRangeAttributes to improve performance in the same way like SetTableCellRangeVals

Using SetTableCellRangeVals to update several thousands table cells is very effective.(better than using ATTR_CTRL_VAL)

I miss similar function for set atribute values in the same way. In example:i need  to set text to be bold or  set background color for each table cell separately.

Ithik that usability of SetTableCellRangeVals will be better if SetTableCellRangeAttributes will be avivaible because there will be the same program approach/logic for values and attributes,instead of mixing multiple cell vallue update and one by one cell attribute update.

 

4 Comments
LuisG
NI Employee (retired)

That function (SetTableCellRangeAttribute) has existed in CVI since version 5.5. Does not work for you?

OVR_CZ
Member

Hi LuisG,

SetTableCellRangeAttribute set the same attribute value to multiple cells. (it sets all cells background color to RED for example).

I want to set value from array in the same way like with SetTableCellRangeVals function.

 

Simplified example:

double CellValues[10]={0.0,1.1,2.2,3.3,4.4,5.5,6.6,7.7,8.8,9.9};
int AttrValues[10]={VAL_RED,VAL_RED,VAL_BLACK,VAL_BLUE,VAL_GREEN,VAL_WHITE,VAL_WHITE,VAL_WHITE,VAL_WHITE,VAL_WHITE};

SetTableCellRangeVals(		panelHandle, PANEL_TABLE, MakeRect(1,1,1,10), CellValues, VAL_COLUMN_MAJOR);
SetTableCellRangeAttributes( panelHandle, PANEL_TABLE, MakeRect(1,1,1,10), ATTR_TEXT_BGCOLOR ,AttrValues, VAL_COLUMN_MAJOR);//this is what i want

(in real application there is up to 10000/100000 rows and AttrValues is calculated from other data,i sometimes use also other attributes like ATTR_TEXT_BOLD,ATTR_TEXT_COLOR,...).

LuisG
NI Employee (retired)

Okay, I understand now. I had missed that suble 's' at the end Smiley Happy

 

Sorry about the confusion.

 

Luis

LuisG
NI Employee (retired)
Status changed to: Under Consideration