01-30-2012 12:44 PM
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
Solved! Go to Solution.
01-31-2012 04:27 AM
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.
02-01-2012 02:14 AM
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
02-01-2012 08:03 AM
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.