
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
Remove Minimize and Maximize Buttons in Tkinter
When we run our tkinter application, it initially displays a window that has an interface to display all the widgets. Eventually, we can remove the maximizing and minimizing property of the displayed window by using the resizable(boolean) method. It takes two Boolean values that refer to the status of width and height of the window. We generally disable the max and min resizing property by assigning zero to both values of width and height.
Example
#Import the required library from tkinter import* #Create an instance of tkinter frame win= Tk() #Set the geometry win.geometry("750x250") #Disable the resizable Property win.resizable(False, False) #Create an Label Widget Label(win, text= "This Window can't be resized", font= ('Helvetica 15 underline')).pack(pady=20) win.mainloop()
Output
Running the above code will display a non-resizable window.
Advertisements