05-11-2011 11:49 AM
Hi All,
I have a table control in my panel. I have to find out the row on which user clicks and also read a particular cell in it. I will appreciate if someone can suggest how should I be doing it.
Thanks,
Kanu
05-11-2011 12:56 PM
A good starting point is checking the samples provided with CVI...
A particular cell can be obtained using
GetCtrlAttribute (panel, control, ATTR_TOP, &top);
GetCtrlAttribute (panel, control, ATTR_LEFT, &left);
GetTableCellFromPoint (panel, control, MakePoint (left, top), &activeCell);
05-11-2011 03:32 PM
You can use:
Point cell;
GetActiveTableCell (paneHandle, PANEL_TABLE, &cell);
See the online help for 'cell' parameter to understand how the Point structire is used.
05-18-2011 06:04 PM
Hi Wolfgang and Roberto,
Thanks for help. I was able get the index of row clicked using EVENT_TABLE_ROW_COL_LABEL_CLICK event for table control and the column inxed using GetTableColumnFromLabel(). After this, I used GetTableCellRangeVals() to read the cell.
Regards,
Kanu