LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help for scollbar

Currently, everytime i write data to a table, the scrollbar automatically moves to the top. Is there a way to stop the scrollbar from moving? As in totally stop at that particular line i am looking at, while data is still being appended at the bottom? In short, is there a function to disable the automatic scrolling.

Regards
AL
0 Kudos
Message 1 of 4
(3,092 Views)
Hello AL,

Instead of disabling the scrollbar, you can write your text to the table, then set the visible line to the last line of the table.

For example:

int totalRows;
GetNumTableRows (panelHandle, PANEL_TABLE, &totalRows);
SetCtrlAttribute (panelHandle, PANEL_TABLE, ATTR_FIRST_VISIBLE_ROW, totalRows);


Hope that helps.
Wendy L
LabWindows/CVI Developer Newsletter
Message 2 of 4
(3,087 Views)
The same tactic works for list boxes. I often use them as test log displays and want to keep the last line visible to the user during the test.
Martin Fredrickson
Test Engineer

Northrop Grumman
Advanced Systems and Products
San Diego, CA 92128
0 Kudos
Message 3 of 4
(3,069 Views)
Hi Wendy,

err... that is not exactly what i want. For example i have a table of about 15 lines and i happen to be looking at line no. 10. An event happen in my program thus inserting another line at the bottom, but i still want to look at line no. 10 and not at the end or at the top. What happens is that in my program the table is holding a list of variables and the values are changing, thus i want to allow user to monitor which ever variable he/she is looking at. I'll try and see if there is any work around it....

Cheers
AL
0 Kudos
Message 4 of 4
(3,065 Views)