dpfmp Posted August 15, 2019 Share Posted August 15, 2019 Hi, Using UniSession.AddJS(uniScrollbox.JSName+'.getTargetEl().scrollTo(''Top'', 0, true);'); gets the vertical scrollbar to the top position at runtime but if the vertical scrollbar was left anywhere but at the top position at compile time, there is no way to reach the top part of the scrollbox anymore. If you drag the 2 scrollbars to their bottom position and click 'ScrollTo TOP' button, the left scrollbox is going back to the top position but the MID scrollbox returns to button4 and the first 3 buttons are unreachable. The position of the vertical scrollbar at compile time becomes the new top of the scrollbox at runtime. I made a small test application: ScrollBoxTest.7z Delphi 10.1 UniGui 1.90.0.1496 ScrollBoxTest.7z Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 15, 2019 Share Posted August 15, 2019 58 minutes ago, dpfmp said: gets the vertical scrollbar to the top position at runtime but if the vertical scrollbar was left anywhere but at the top position at compile time, there is no way to reach the top part of the scrollbox anymore. Hi, Yes, there is a bug: TUniScrollbox actually changes the top and left properties of the controls it contains, when you scroll. We will fix this issue. Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted August 19, 2019 Administrators Share Posted August 19, 2019 Confirmed. This behavior is by design. However, I will try to improve it. Quote Link to comment Share on other sites More sharing options...
dpfmp Posted August 19, 2019 Author Share Posted August 19, 2019 Hi Farshad, Is there a way to force the scrollbar to the top position in the OnBeforeShow event? The VCL version has a VerticalScrollBar.Position that can be used to bring it back to the top. As it is, any uniscrollbox with a vertical scrollbar left in a position other than the top position at design time will make part of it unusable at runtime. Thank you for looking into it. Denis Prince Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 19, 2019 Share Posted August 19, 2019 5 minutes ago, dpfmp said: Is there a way to force the scrollbar to the top position in the OnBeforeShow event? Hi, At the moment, the best way is to set "top = 0" in designtime. Quote Link to comment Share on other sites More sharing options...
dpfmp Posted August 19, 2019 Author Share Posted August 19, 2019 Hi Sherzod, 'Top' has to do with the UniScrollBox and not the vertical scrollbar. I guess what you mean is that for every uniscrollbox having a verticalscrollbar at design time, I should always drag the scrollbar at the top position before compiling. That is what I'll keep doing. Thank you Quote Link to comment Share on other sites More sharing options...
Sherzod Posted August 19, 2019 Share Posted August 19, 2019 4 minutes ago, dpfmp said: I guess what you mean is that for every uniscrollbox having a verticalscrollbar at design time, I should always drag the scrollbar at the top position before compiling. At the moment, yes. Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted August 21, 2019 Administrators Share Posted August 21, 2019 Fixed. 1 Quote Link to comment Share on other sites More sharing options...
Wilton Ergon Posted April 28, 2020 Share Posted April 28, 2020 I still have this behavior, sometimes in design I end up forgetting the scroll in any position, and when running, it shows me an empty area at the top of the scroll, this seems to me the same problem as the friend mentioned above, which seems to have been fixed . I will attach prints for better understanding. IF YOU EXECUTE THIS WAY IT WILL BE LIKE: STAY WITH THIS EMPTY AREA COMPILED WITH SCROOL OUT OF INITIAL POSITION Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 28, 2020 Share Posted April 28, 2020 Hello, Which build are you using? It already has been fixed. Quote Link to comment Share on other sites More sharing options...
Gustavo_GRSoft Posted January 11, 2021 Share Posted January 11, 2021 same problem here, im using build 1539 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 11, 2021 Share Posted January 11, 2021 9 minutes ago, Gustavo_GRSoft said: same problem here, im using build 1539 Indicate the source where you downloaded this build. Quote Link to comment Share on other sites More sharing options...
Gustavo_GRSoft Posted January 11, 2021 Share Posted January 11, 2021 oficial.. https://prime.fmsoft.net/userv/mportal.dll Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 11, 2021 Share Posted January 11, 2021 Just now, Gustavo_GRSoft said: oficial.. https://prime.fmsoft.net/userv/mportal.dll Ok sorry, Not a trial edition? Quote Link to comment Share on other sites More sharing options...
Gustavo_GRSoft Posted January 11, 2021 Share Posted January 11, 2021 no, registred... Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 11, 2021 Share Posted January 11, 2021 1 minute ago, Gustavo_GRSoft said: no, registred... Thank you. First of all, please adjust your forum email address: Quote Link to comment Share on other sites More sharing options...
Gustavo_GRSoft Posted January 11, 2021 Share Posted January 11, 2021 done... 1 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 11, 2021 Share Posted January 11, 2021 Can you reproduce this issue with this demo?: \FMSoft\Framework\uniGUI\Demos\Desktop\ScrollBox Quote Link to comment Share on other sites More sharing options...
Gustavo_GRSoft Posted January 11, 2021 Share Posted January 11, 2021 I can't because the project is very complex and has several database connections. Is there any way to make the scrollbox go to the top dynamically? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 11, 2021 Share Posted January 11, 2021 Just now, Gustavo_GRSoft said: I can't because the project is very complex and has several database connections. Is there any way to make the scrollbox go to the top dynamically? I am not asking for a test case from you. 18 minutes ago, Sherzod said: Can you reproduce this issue with this demo?: \FMSoft\Framework\uniGUI\Demos\Desktop\ScrollBox This is a standard UniGUI demo. I mean, could you reproduce your case in this demo example? Quote Link to comment Share on other sites More sharing options...
Gustavo_GRSoft Posted January 11, 2021 Share Posted January 11, 2021 I can't because the error only happens when I feed a dbgrid and only happens in this situation, the rest of the system works perfectly Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 11, 2021 Share Posted January 11, 2021 17 minutes ago, Gustavo_GRSoft said: I can't because the error only happens when I feed a dbgrid and only happens in this situation, the rest of the system works perfectly TeamViewer? Quote Link to comment Share on other sites More sharing options...
Gustavo_GRSoft Posted January 11, 2021 Share Posted January 11, 2021 I cannot open TeamViewer, it is prohibited inside the company. I can make a video if you want. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted January 11, 2021 Share Posted January 11, 2021 6 minutes ago, Gustavo_GRSoft said: I cannot open TeamViewer, it is prohibited inside the company. I can make a video if you want. Ok... 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.