Automatically resizing a guizero window

415 Views Asked by At

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?

1

There are 1 best solutions below

1
On

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