Skip to content
Advertisement

Can I change the title bar in Tkinter?

I’m using Tkinter as GUI for my program, but as I see, many programs don’t have standard look as Tkinter does. By standard look I mean standard title bar, borders, etc.

For example, Tkinter’s title bar:

http://pokit.org/get/img/1a343ad92cd8c8f19ce3ca9c27afecba.jpg

vs GitHub’s title bar:

http://pokit.org/get/img/cf5cef0eeae5dcdc02f450733fd87508.jpg

See how they have their own custom exit, resize and minimize buttons? Is it possible to achieve that look using Tkinter?

Thanks in advance! :)

Advertisement

Answer

Yes it’s possible. You can use the overrideredirect() method on the root window to kill the title bar and the default geometry settings. After that, you need to rebuild all those methods from scratch to set it back up like you want. Here’s a small working example with minimal functionality:

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement