Jump to content

Manipulate the position of UniScrollBox


Alessandro

Recommended Posts

Hello everyone.

 

I´m use XE5 and uniGUI 0.95.

I have a form having various fields, and in the form I´m use the TUniScrollBox to behave them.

However, this component does not have the ".VertScrollBar.Position: = n".

What happens ... every time I open an existing record, to read all the fields, the Scroll is positioned at the end of the form, which requires the user to have to roll the scroll bar to the top to start watching the information.

I tried using the very form of scrollBar, but when using the command 'Form.VertScrollBar.Position: = 0' gives an external exception.

Does anyone have a solution for that I place the beginning of the Scroll?

Thank you.

Alessandro.
Link to comment
Share on other sites

Hi.

Perhaps it will help you:

 

UniSession.AddJS(UniScrollBox.JSName+'.getTargetEl().scrollTo("top");');  - for Desktop

 

and

 

UniSession.AddJS(UnimScrollBox.JSName+'.getScrollable().getScroller().scrollTo(0, 0);'); - for Mobile

  • Upvote 1
Link to comment
Share on other sites

  • 7 years later...
28 minutes ago, Kattes said:

For me the following code for mobile environment worked:
 

  UniSession.AddJS(UnimScrollBox1.JSName+'.getScrollable().scrollTo(0, 0);');   // Scroll to Top

Also you can use this code:

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...