Alessandro Posted April 28, 2015 Share Posted April 28, 2015 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 More sharing options...
aln02 Posted April 28, 2015 Share Posted April 28, 2015 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 1 Link to comment Share on other sites More sharing options...
Kattes Posted June 2, 2022 Share Posted June 2, 2022 For me the following code for mobile environment worked: UniSession.AddJS(UnimScrollBox1.JSName+'.getScrollable().scrollTo(0, 0);'); // Scroll to Top Link to comment Share on other sites More sharing options...
Sherzod Posted June 2, 2022 Share Posted June 2, 2022 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 More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now