LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

table disable auto scroll

Solved!
Go to solution

Hi,

 

is there a way of disable the auto scrolling in a table?

 

I do a refresh very 5 sec of a table that can hold up to 50 rows.  Every refresh, it scrolls bask to the top but I want to disable this auto scroll so even after a refresh, the scroll bar stays where it was before.

 

using cvi 2010.

 

Thnaks

0 Kudos
Message 1 of 4
(4,962 Views)

Can you check if SetActiveTableCell function works for you?

 

It automatically scrolls the table such that the selected active cell is visible.

You can call this function after every table update to keep it fixed.

S. Eren BALCI
IMESTEK
0 Kudos
Message 2 of 4
(4,954 Views)

Hi,

    i am suppose that in your application, you first delete and then insert table rows every refresh.

    it is better to check how many rows exist and then insert or delete rows to have requested number of rows.

    after this, you can just set value to existing rows/cells.

    for many rows/cells i recommend to use  SetTableCellAttribute(..,..,..,ATTR_CTRL_VAL,value) instead of SetTableCellVal because it is lot more effective.

    (or alternative fuction SetTableCellRangeVals)

 

    You can also check table attribute ATTR_FIRST_VISIBLE_ROW to fix first visible row but this force Whole row to be visible.(so when you move table scrollbar to start table at half of row, this attribute cause that full row be visible)

 

   I hope this help

   

   

0 Kudos
Message 3 of 4
(4,937 Views)
Solution
Accepted by topic author Goncalo

Hello,

 

Thanks for your help.

 

I used the SetActiveCell (only once), then create the table will all the rows I need.  Then et every refresh I add the new values and there is no more auto scrolling.  I can move the scroll bar the way I want and it doesn't go back to the top or bottom.

 

 

0 Kudos
Message 4 of 4
(4,933 Views)