LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Table Auto Scroll

I have a table with 20 rows and 5 columns.
The table is updated every second with new rows/data which go past the 20 rows.
However, the table is not auto scrolling to keep up with the new rows.
 
Is there a way to auto scroll or have the table keep up with the latest row ?
 
Thanks
Diego
0 Kudos
Message 1 of 8
(5,508 Views)

Hi Diego,

after you insert the new table row, just add this code:

     GetNumTableRows (panel, PNL_TABLE, &num_rows);

     SetCtrlAttribute (panel, PNL_TABLE, ATTR_FIRST_VISIBLE_ROW, num_rows);

Message 2 of 8
(5,492 Views)
Wim,
Thanks very much for your suggestion.
 
Would you happen to know how to add a complete BLANK row ?  I have both string and bouble columns and not sure how to add a complete blank row.
 
Thanks
Diego
0 Kudos
Message 3 of 8
(5,483 Views)

Hello Diego,

A table cell containing a numeric value cannot be empty, so it is not possible to add a complete blank row when the table contains double columns. A possible work around would be to represent the double values in a string cell.

0 Kudos
Message 4 of 8
(5,480 Views)

Wim,

Yes, I came to the same conclusion, but was double checking.

Thanks again for your input.

Diego

0 Kudos
Message 5 of 8
(5,476 Views)
Hello Diego,
 
If it's cumbersome for you to change the cell types, another solution might be to change the text color: get the value of the ATTR_TEXT_BGCOLOR cell attribute, and then set the ATTR_TEXT_COLOR cell attribute to match that color.
 
Luis
0 Kudos
Message 6 of 8
(5,458 Views)
Hi Luis,
 
When the cell becomes active, the background will turn blue, and the text will become visible anyway Smiley Sad
0 Kudos
Message 7 of 8
(5,438 Views)
Ah. Excellent point. I hadn't thought of that.
 
0 Kudos
Message 8 of 8
(5,425 Views)