- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How do I set a 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.
- Related Articles
- How do I close a tkinter window?
- How to Set a Tkinter Window with a Constant Size?
- How to set a Tkinter window to a constant size?
- How do I create a popup window in Tkinter?
- How do I open a website in a Tkinter window?
- How do I create a popup window using Tkinter?
- How do I create a popup window using Tkinter Program?
- How do I position the buttons on a Tkinter window?
- How do I handle the window close event in Tkinter?
- How do I use Window Manager (wm) attributes in Tkinter?
- How do I change button size in Python Tkinter?
- How do I insert a JPEG image into a Python Tkinter window?
- How do I get the width and height of a Tkinter window?
- How do I get rid of the Python Tkinter root window?
- Python Tkinter – How do I change the text size in a label widget?

Advertisements