Welcome to %s forums

BrainModular Users Forum

Login Register

scrolling listbox from a script

I need help on a Patch
Post Reply
sm_jamieson
Member
Posts: 559
Contact:

Unread post by sm_jamieson » 11 Feb 2015, 14:44

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.

sephult
Member
Posts: 1144
Contact:

Unread post by sephult » 11 Feb 2015, 14:51

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
"Every act of creation is first an act of destruction." -Picasso

sm_jamieson
Member
Posts: 559
Contact:

Unread post by sm_jamieson » 11 Feb 2015, 15:27

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.

sephult
Member
Posts: 1144
Contact:

Unread post by sephult » 11 Feb 2015, 16:12

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
"Every act of creation is first an act of destruction." -Picasso

sm_jamieson
Member
Posts: 559
Contact:

Unread post by sm_jamieson » 13 Feb 2015, 10:44

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 35 guests