LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Rings in Tables

Solved!
Go to solution

CVI 2019, Win10.

 

Why does ATTR_CTRL_INDEX not work with Ring controls in Tables?  They appear to be rings.  They work mostly the same as panel ring controls.  But the only way to set or get a Table ring index is to set or read the character string value ( SetTableCellAttribute  and GetTableCellAttribute ).  In order to get a numeric index, one has to compare text strings. 

 

This is absurdly complicated.

 

0 Kudos
Message 1 of 3
(2,349 Views)
Solution
Accepted by topic author hendra@ngms

The following seems to work for me...

 

int row=eventData1, col=eventData2;
char tableCellVal[80];
int index;

...

GetTableCellVal(panel,control,MakePoint(col,row),tableCellVal);
GetTableCellRingIndexFromValue(panel, control,0,MakePoint(col,row),&index,tableCellVal);

...

SetTableCellValFromIndex(panel,control,MakePoint(col,row),index);

0 Kudos
Message 2 of 3
(2,296 Views)
Thank you! I searched around and did not find this group of functions. Works perfectly.
0 Kudos
Message 3 of 3
(2,284 Views)