eduardosuruagy Posted May 23, 2017 Posted May 23, 2017 How do I leave the UniScrollBox always with the top in the beginning? Quote
Sherzod Posted May 23, 2017 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
eduardosuruagy Posted May 23, 2017 Author 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
Sherzod Posted May 23, 2017 Posted May 23, 2017 Hi, Can you make a simple testcase for this? Best regards, Quote
eduardosuruagy Posted May 23, 2017 Author 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
Sherzod Posted May 23, 2017 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
eduardosuruagy Posted May 23, 2017 Author 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
Sherzod Posted May 24, 2017 Posted May 24, 2017 Hi, Can you make a testcase for this? Best regards, Quote
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.