Jump to content

Recommended Posts

Posted
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.
Posted

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
  • 7 years later...
Posted

For me the following code for mobile environment worked:
 

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

 

Posted
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:

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...