06-21-2013 12:24 PM
06-21-2013 04:18 PM
The nearest equivalent should be SetActiveTableCell ().
06-21-2013 04:32 PM
That VI actually make the specified cell row up to be the top-left visible cell.
Got help from NI AE.
SetCtrlAttribute(panel, PANEL_TABLE, ATTR_FIRST_VISIBLE_ROW, cell.y);
works in the following code:
cell.x = 2;
cell.y = 1;
err = GetTableCellFromValue (panel, PANEL_TABLE, cell, MakeRect(1,2,NR-1,1), &cell, VAL_COLUMN_MAJOR, VAL_CELL_STRING, VAL_CHAR,selected);
if ( ( err < 0) || ( (cell.x == 0) && (cell.y == 0) ) )
{
//not found
cell.x = 2;
cell.y = 1;
}
MessagePopup("","");
err = SetCtrlAttribute(panel, PANEL_TABLE, ATTR_FIRST_VISIBLE_ROW, cell.y);
if (err < 0)
MessagePopup("Error", "Setting first visible row in table.");
SetTableCellRangeAttribute(panel, PANEL_TABLE, MakeRect(cell.y, 2, 1, NC-1), ATTR_TEXT_BGCOLOR, VAL_CYAN);
However, if I comment out MessagePopup("","");
then it won't work.
06-21-2013 05:37 PM
Not exactly what I expected. But works too.
Doesn't have to be top row. As long as visible, works for me.
Thanks.