- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- 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 change the Tkinter default title in the OS bar?
The Tkinter application window has many components: window size, title, navbar, menubar-component, etc. To configure the window attributes or properties, we can use the Window Manager toolkit defined in Tcl/Tk.
To run the Window Manager attributes, use the command 'wm' with other keywords. The title of the window can be configured by using wm_title("title") or title("title") method.
Example
# Import the required libraries from tkinter import * # Create an instance of tkinter frame or window win=Tk() # Set the size of the window win.geometry("700x350") # Change the title of the window win.wm_title("My Window") Label(win, text="Hello, Welcome to Tutorialspoint...", font=('Calibri 24')).pack() win.mainloop()
Output
If we run the above code, it will display a window with a title "My Window".
Advertisements