- 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 to make a Tkinter window not resizable?
Tkinter initially creates a resizable window for every application. Let us suppose that we want to make a non-resizable window in an application. In this case, we can use resizable(height, width) and pass the value of height=None and width=None. The method also works by passing Boolean values as resizable(False, False).
Example
#Import the required libraries from tkinter import * #Create an instance of tkinter frame win= Tk() #Set the geometry of frame win.geometry("600x250") #Set the resizable property False win.resizable(False, False) #Create a label for the window or frame Label(win, text="Hello World!", font=('Helvetica bold',20), anchor="center").pack(pady=20) win.mainloop()
Output
Running the above code will display a non-resizable window.
- Related Articles
- How to make a Tkinter window jump to the front?
- How to make Tkinter Window appear in the taskbar?
- How to make a resizable element in React JS
- How to create a resizable Windows without title bar in Tkinter?
- How to add a margin to a tkinter window?
- How to delete Tkinter widgets from a window?
- How to set a Tkinter window to a constant size?
- Tkinter-How to get the current date to display in a tkinter window?
- How to specify where a Tkinter window should open?
- How do I close a tkinter window?
- How to show webcam in TkInter Window?
- How to make a fullscreen window with JavaScript?
- How to Set a Tkinter Window with a Constant Size?
- How to close a Tkinter window by pressing a Button?
- How to bind the Enter key to a tkinter window?

Advertisements