I have written a guizero code that creates a new window with different amounts of information on it depending on what is selected. I was just wondering if there is a function to resize the window to fit all of the information. I am currently just making the window big enough to fit the largest amount of information but I would rather have it so it resizes it automatically. And also is there a simple function so that if the window size is changed all of the widgets inside of it change size as well?
Asked
Active
Viewed 295 times
1
-
I *think* you would have to do this yourself -- i.e. keeping track of the widgets displayed and updating the `app.width` and `app.height`. What layout are you using. The layout may provide a way. – nickdmax Mar 19 '22 at 22:16
-
Ok I can code that easily enough, I'm not currently using a layout. I was just wondering if there was a specific function for this. I couldn't find one in the guizero documentation so I guess there isn't one. Thank you – Daniel Gerhard Mar 19 '22 at 22:27
1 Answers
0
I think is not possible to automaticly resize the window but you can count the number of lines and resize the window.
numLines*defaultHeightByLine + height of the other elements

Pedro Vicente
- 1
- 2
-
Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community May 26 '22 at 16:36