
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Set Minimum Window Size in Tkinter
A Tkinter window can be initialized after running the application. Generally, the width and the height of the window is resizable which can be minimized.
In order to set the window size to its minimum value, assign the value of width and height in minsize(height, width) method. The method can be invoked with the window or frame object.
Example
#Import the required libraries from tkinter import * #Create an instance of tkinter frame win= Tk() #Minimize the window win.minsize(150, 100) #Create a text label Label(win, text= "Window Size is minimized to 150x100",font=('Helvetica bold',20)).pack(pady=20) win.mainloop()
Output
Running the above code will set the window size to its minimum.
Advertisements