eduardosuruagy Posted May 23, 2017 Share Posted May 23, 2017 How do I leave the UniScrollBox always with the top in the beginning? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 23, 2017 Share Posted May 23, 2017 Hi, Can you clarify your question again? Maybe these links will help you: http://forums.unigui.com/index.php?/topic/7979-scrollbox-en-altta-açılma-sorunu/ http://forums.unigui.com/index.php?/topic/3601-uniscrollbox-scrolltop/ http://forums.unigui.com/index.php?/topic/3426-uniscrollbox-position-of-scrollable-area-in-the-scrollbox/ http://forums.unigui.com/index.php?/topic/3214-scrolling-the-scroll-box/ Best regards, Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted May 23, 2017 Author Share Posted May 23, 2017 Hi, Can you clarify your question again? Maybe these links will help you: http://forums.unigui.com/index.php?/topic/7979-scrollbox-en-altta-açılma-sorunu/ http://forums.unigui.com/index.php?/topic/3601-uniscrollbox-scrolltop/ http://forums.unigui.com/index.php?/topic/3426-uniscrollbox-position-of-scrollable-area-in-the-scrollbox/ http://forums.unigui.com/index.php?/topic/3214-scrolling-the-scroll-box/ Best regards, I had already tried these options yesterday, but they all make mistakes. The errors are these: Cannot read property 'scrollTo' of undefined procedure TMainForm.UniFormCreate(Sender: TObject); begin UniSession.AddJS(UniScrollbox1.JSName+'.body.scrollTo(''Top'', 0, true);'); end; --- Cannot set property 'scrollTop' of null procedure TMainForm.UniFormCreate(Sender: TObject); begin UniSession.AddJS('document.getElementById("'+UniScrollBox1.JSName+'_id-body").scrollTop = 0;'); end; Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 23, 2017 Share Posted May 23, 2017 Hi, Can you make a simple testcase for this? Best regards, Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted May 23, 2017 Author Share Posted May 23, 2017 Hi, Can you make a simple testcase for this? Best regards, I used this example of unigui folder C:\Program Files (x86)\FMSoft\Framework\uniGUI\Demos\Desktop\ScrollBox Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 23, 2017 Share Posted May 23, 2017 Ok Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 23, 2017 Share Posted May 23, 2017 Hi, I couldn't reproduce your issue, it seems that you have active control at the end If I understand you correctly, can you try this approach for now ?!: 1. UniScrollBox1 -> ClientEvents -> UniEvents -> function beforeInit: function beforeInit(sender, config) { config.autoScroll=false; } 2. MainForm -> OnReady event: procedure TMainForm.UniFormReady(Sender: TObject); begin UniScrollBox1.JSInterface.JSCall('setAutoScroll', [True]); end; Best regards, Quote Link to comment Share on other sites More sharing options...
eduardosuruagy Posted May 23, 2017 Author Share Posted May 23, 2017 Hi, I couldn't reproduce your issue, it seems that you have active control at the end If I understand you correctly, can you try this approach for now ?!: 1. UniScrollBox1 -> ClientEvents -> UniEvents -> function beforeInit: function beforeInit(sender, config) { config.autoScroll=false; } 2. MainForm -> OnReady event: procedure TMainForm.UniFormReady(Sender: TObject); begin UniScrollBox1.JSInterface.JSCall('setAutoScroll', [True]); end; Best regards, Unfortunately it did not work Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 24, 2017 Share Posted May 24, 2017 Hi, Can you make a testcase for this? Best regards, Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.