LabWindows/CVI

取消
显示结果 
搜索替代 
您的意思是: 

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 项奖励
1 条消息(共 8 条)
5,873 次查看

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);

2 条消息(共 8 条)
5,857 次查看
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 项奖励
3 条消息(共 8 条)
5,848 次查看

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 项奖励
4 条消息(共 8 条)
5,845 次查看

Wim,

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

Thanks again for your input.

Diego

0 项奖励
5 条消息(共 8 条)
5,841 次查看
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 项奖励
6 条消息(共 8 条)
5,823 次查看
Hi Luis,
 
When the cell becomes active, the background will turn blue, and the text will become visible anyway 难过表情
0 项奖励
7 条消息(共 8 条)
5,803 次查看
Ah. Excellent point. I hadn't thought of that.
 
0 项奖励
8 条消息(共 8 条)
5,790 次查看