- Trending Categories
- Data Structure
- Operating System
- C Programming
- 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 can I prevent a window from being resized with 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.
#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()
Running the above code will display the following the tkinter window, but you won't be able to resize it.
- Execute a script when the browser window is being resized in HTML?
- How can I resize the root window in Tkinter?
- How do I close a tkinter window?
- How to Prevent Twitter Accounts from being Hacked
- How do I create a popup window in Tkinter?
- How do I create a popup window using Tkinter?
- How to prevent raw rice from being destroyed by termites?
- How do I open a website in a Tkinter window?
- How to delete Tkinter widgets from a window?
- WebGL: Prevent color buffer from being cleared in HTML5
- Prevent a combination of items from being inserted twice in MySQL?
- How do I set a minimum window size in Tkinter?
- How do I create a popup window using Tkinter Program?
- How do I position the buttons on a Tkinter window?
- How can I create a dropdown menu from a List in Tkinter?