
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
Prevent Window Resizing in Tkinter
Tkinter windows can be resized automatically by hovering and pulling over the window. We can disable the resizable property using the resizable(boolean value) method. We will pass false value to this method which will disable the window to be resized.
Example
#Import the tkinter library from tkinter import * #Create an instance of tkinter frame win = Tk() #Set the geometry win.geometry("650x250") Label(win, text= "Hello World", font=('Times New Roman bold', 20)).pack(pady=20) #Make the window resizable false win.resizable(False,False) win.mainloop()
Output
Running the above code will display the following the tkinter window, but you won't be able to resize it.
Advertisements