Page 1 of 1
Posted: 11 Feb 2015, 14:44
by sm_jamieson
Is there any way to control the scroll position of a listbox from a script ?
If I change the current selection of a listbox from a script, and the newly selected item is scrolled out of view, I need to change the scroll position to bring the selected line into view.
Thanks,
Simon.
Posted: 11 Feb 2015, 14:51
by sephult
That is one of my qualms too.
I cannot remember but I believe awhile back I had some requests that were fixed in the listbox like correcting the numbering etc...
Centering the view on the selected object is one of them, you should send in a bug report and I will note it as well.
-S
Posted: 11 Feb 2015, 15:27
by sm_jamieson
Yes, there should probably be a property to cause selected items to scroll into view - centered / bottom / top, etc.
I'm not sure about always centering the selection in the scroll window. That would sometimes be what you want. But you would not want the thing to scroll automatically if you selected the top item in the window and it scrolled down to the middle !
A general solution would be to add scroll control to anything that scrolls. This could just be a "scroll" parameter that is set to the line number you want at the top of the scroll box. Or a scroll percentage to be even more general.
Simon.
Posted: 11 Feb 2015, 16:12
by sephult
I agree you wouldn't want it to snap back into place when the scroll was released.
However, I think if you select a value externally it should come into view, or remain in view when selected....unless overridden by the scroll.
-S
Posted: 13 Feb 2015, 10:44
by sm_jamieson
Yes that makes sense.
On the "Report a bug" page I can view reported bugs but I cannot see any way to report one.
Maybe I don't have the required level of support ?
Simon.