3

Using Python 2 and Tkinter, how can I make the Tk window launch without the title bar above the window?

from Tkinter import *

root = Tk()
frame = Frame(root)
frame.pack()

bottomframe = Frame(root)
bottomframe.pack( side = BOTTOM )

redbutton = Button(frame, text="Red", fg="red")
redbutton.pack( side = LEFT)

greenbutton = Button(frame, text="Brown", fg="brown")
greenbutton.pack( side = LEFT )

bluebutton = Button(frame, text="Blue", fg="blue")
bluebutton.pack( side = LEFT )

blackbutton = Button(bottomframe, text="Black", fg="black")
blackbutton.pack( side = BOTTOM)

root.mainloop()
Gunner Stone
  • 997
  • 8
  • 26

1 Answers1

3

You can remove all decoration from a Tkinter window (Tk or Toplevel) by using .overrideredirect():

root = Tk()
root.overrideredirect(True)
Uyghur Lives Matter
  • 18,820
  • 42
  • 108
  • 144
  • This looks like it completely removes all formatting on the root window. Is there a way to 'only' remove the title bar? – Gunner Stone May 13 '16 at 02:36
  • If you want to only remove the title bar, I think you want something more like [Using TCL extensions to set native window style in Tkinter](http://stackoverflow.com/q/3306189/369450). – Uyghur Lives Matter May 13 '16 at 02:42