Remove Title Bar in Tkinter Window without Overrideredirect Method



To remove the title bar of a Tkinter window, we can use wm_attributes('type', 'value') method by specifying the type of property. In the following example, we will use 'fullscreen', a Boolean value that removes the title bar of the window.

Example

#Import the tkinter library
from tkinter import *

#Create an instance of tkinter frame
win = Tk()
win.geometry("700x350")

#Create a Label to print the Name
label= Label(win, text="This is a New Line Text", font= ('Helvetica 14 bold'), foreground= "red3")
label.pack()

win.wm_attributes('-fullscreen', 'True')
win.mainloop()

Output

Running the above code will display a fullscreen window without the title bar.

Updated on: 2021-05-25T08:51:14+05:30

9K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements