Tkinter window geometry to manage height width and zoom out using state and resizable() option
Our parent window is referred as my_w in all our examples below.
my_w = tk.Tk()
Resize the window
There is a button at the top bar for the user to resize the parent window. By holding and dragging the edges we can resize the window.
We can prevent this by using resizable() option. By default width and height values are 1 ( True ).
my_w.resizable(width=0,height=0) # size change Not allowed
We can only allow horizontally resizing the window.
By managing the state method we can maximize the window to full screen. Values for this option are normal ( default value ) , iconic, withdrawn, or zoomed
Zooming the parent window
We can increase or decrease the width , height from inside the window by managing the geometry() option. We can place buttons in our window to zoom in or zoom out the parent window.
We used the click event of button to call a function my_resize() and inside it change the width and height of parent window.
minsize() and maxsize()
We can restrict the height and width of the window by using minsize() and maxsize(). These are the end limits for our height width for expansion and contraction of the window.