LabWindows/CVI Idea Exchange

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

GetTableIndex function is missing

Status: New

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;
}
Davide Vittorio G. - TLGB S.R.L.
Italian SW Developer
1 Comment
holly7787
Member

maybe a better name is GetTabelCellIndex

Davide Vittorio G. - TLGB S.R.L.
Italian SW Developer