In Tkinter, minsize() method is used to set the minimum size of the Tkinter window. Using this method user can set window’s initialized size to its minimum size, and still be able to maximize and scale the window larger.
Syntax:
master.minsize(width, height)
Here, height and width are in pixels.
Code #1: Root window without minimum size that means you can shrink window as much you want.
Python3
from tkinter import *
from tkinter.ttk import *
from time import strftime
root = Tk()
Label(root, text = 'GeeksforGeeks',
font =('Verdana', 15)).pack(side = TOP, pady = 10)
Button(root, text = 'Click Me !').pack(side = TOP)
mainloop()
|
Output: Initial root window without alteration in size
Root window after shrunken down, see the window is completely shrunken because it has no minimum geometry.
Code #2: Root window with minimum size.
Python3
from tkinter import *
from tkinter.ttk import *
from time import strftime
root = Tk()
root.minsize(150, 100)
Label(root, text = 'GeeksforGeeks',
font =('Verdana', 15)).pack(side = TOP, pady = 10)
Button(root, text = 'Click Me !').pack(side = TOP)
mainloop()
|
Output: Initial window
Expanded window (we can expand window as much as we want because we haven’t set the maximum size of the window).
Window shrunken to it’s minimum size (one cannot shrunk it any further).

Don't miss your chance to ride the wave of the data revolution! Every industry is scaling new heights by tapping into the power of data. Sharpen your skills, become a part of the hottest trend in the 21st century.Dive into the future of technology - explore the
Complete Machine Learning and Data Science Program by GeeksforGeeks and stay ahead of the curve.
Commit to GfG's Three-90 Challenge! Purchase a course, complete 90% in 90 days, and save 90% cost click here to explore.
Last Updated :
19 Oct, 2022
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...