sometimes i use the table object in CVI but there is one function that is missing and i think it's really usefull, the one that give you the ring index directly.
now i'm doing it in this way, maybe there is a better way to do it but i've not spent too much time to do it.
/// HIFN This function give you the item ring index.
/// HIRET an integer value containing the function result.
/// HIPAR panel/panel handle where the control is located.
/// HIPAR control/which control i have to analyze.
/// HIPAR column/in what column i have to look.
/// HIPAR row/in what row i have to look.
static int GetTableIndex(int panel, int control, int column, int row)
{
int Result = {0};
long IndexLength = {0};
char *IndexTemp = {0};
GetTableCellValLength(panel, control, MakePoint (column, row), &IndexLength);
IndexTemp = calloc(IndexLength + 1, sizeof(char));
GetTableCellAttribute (panel, control, MakePoint (column, row), ATTR_CTRL_VAL, IndexTemp);
GetTableCellRingIndexFromValue (panel, control, 0, MakePoint (column, row), &Result, IndexTemp);
free(IndexTemp);
IndexTemp = 0;
return Result;
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.