artem_niko Posted March 31, 2023 Share Posted March 31, 2023 Good afternoon! Such a situation. I need UniForm1 to display the same dimensions as the UniPageControl parent for UniForm1. In general, what kind of algorithm I do actions. 1. Assign the parent and the dimensions Width and Height to UniForm1, before displaying it: procedure TMainForm.UniButton1Click(Sender: TObject); begin F_LaunchedModule.Parent:=UniPageControl1; F_LaunchedModule.Height:=UniPageControl1.Height; F_LaunchedModule.Width:=UniPageControl1.Width; F_LaunchedModule.Show(); end; 2. When changing the size of the browser window, you need to change the size of UniForm1 to the size of the UniPageControl, i.e. the parent. Now it turns out that when you change the size of the browser window, the dimensions of the UniForm1 form do not change, they remain the same as the values received in paragraph No. 1 of the algorithm above. How to make UniForm1 change its size if the browser window size has changed, and hence its parent (UniPageControl)? I watched the demo from the uniGUI\Framework\uniGUI\Demos\Desktop\Form With Parent 5 folder, made the settings as in the example, but the size does not change anyway Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 31, 2023 Share Posted March 31, 2023 Hello, Which alignment are you using? Quote Link to comment Share on other sites More sharing options...
artem_niko Posted March 31, 2023 Author Share Posted March 31, 2023 6 hours ago, Sherzod said: Hello, Which alignment are you using? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 31, 2023 Share Posted March 31, 2023 I know you don't like creating test cases. But, if you create, we could check your case. Otherwise, you should analyze the related demos. Quote Link to comment Share on other sites More sharing options...
artem_niko Posted April 1, 2023 Author Share Posted April 1, 2023 11 hours ago, Sherzod said: I know you don't like creating test cases. But, if you create, we could check your case. Otherwise, you should analyze the related demos. Another idea came to mind: you can transfer the dimensions of the parent when the dimensions of the main form (MainForm) change. What event is responsible for this, so that when the browser window sizes change, and hence the MainForm sizes, then at this moment just pass the parent sizes to UniForm1? Quote Link to comment Share on other sites More sharing options...
mikromundo Posted April 2, 2023 Share Posted April 2, 2023 maybe this is not the solution you need, but after seeing several posts over the years about responsiveness, I set up a base project (actually there are 5) where I managed to solve your question and many others, such as controlling color themes, fonts and several other configurations, runtime translation etc and also use only one code, only one form/frame for desktop and mobile (no use of hybrid mobile) and best of all, without using html, css, js or extjs. even though it's not what you're looking for, I leave the link where there are several demonstrative videos and of course, I'm at your disposal. http://forums.unigui.com/index.php?/topic/22690-radcore-project/ ps: several unigui users (in several countries) already have applications in production (some with almost 3 years old) based on RadCORE. 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.