fraxzi Posted February 20, 2020 Share Posted February 20, 2020 Hi Guys, I am working on a Panel which I would like to position center of screen or my main form. I came into some issues when resizing the browser. I attached the screen and case project. Using uniGUI 1.90.1522 and Delphi Rio ... Any inputs and suggestions are highly appreciated. Thanks, Frances Panel_Resize.zip Link to comment Share on other sites More sharing options...
Sherzod Posted February 20, 2020 Share Posted February 20, 2020 7 hours ago, fraxzi said: I came into some issues when resizing the browser. Hi, Not fully analyzed, but try... procedure TMainForm.UniFormScreenResize(Sender: TObject; AWidth, AHeight: Integer); begin Self.WebForm.JSInterface.JSCall('center', []); end; OR function viewport.resize(sender, width, height, oldWidth, oldHeight, eOpts) { MainForm.window.center(); } Link to comment Share on other sites More sharing options...
fraxzi Posted February 21, 2020 Author Share Posted February 21, 2020 Hi Sherzod, Good morning from Manila! Unfortunately the first option has the same result (as the gif) and the 2nd option, the panel did not show. Kind regards, Frances Link to comment Share on other sites More sharing options...
cbr Posted February 22, 2020 Share Posted February 22, 2020 Hi Frances, I suggest not mix the AlignmentControl uniAlignmentClient and uniAlignmentServer. If you use uniAlignmentClient (it is the fastest way) , don't use the Align property but the powerful LayoutConfig properties. Attached I propose some changes to your code, using the first Sherzod suggestion. Regards from Italy, Cesare ServerModule_1.zip Link to comment Share on other sites More sharing options...
fraxzi Posted February 29, 2020 Author Share Posted February 29, 2020 On 2/23/2020 at 6:58 AM, cbr said: Hi Frances, I suggest not mix the AlignmentControl uniAlignmentClient and uniAlignmentServer. If you use uniAlignmentClient (it is the fastest way) , don't use the Align property but the powerful LayoutConfig properties. Attached I propose some changes to your code, using the first Sherzod suggestion. Regards from Italy, Cesare ServerModule_1.zip Hi Cesare, This is great result! So amazed because I am really so newbie with these great stuff.. Thank you for helping and pointing me to the right path. Kind regards from Manila, Frances 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