Skip to content
Advertisement

Python: Tkinter: How to change the windows border color?

Every result I’ve gotten from searching this question up has to do with changing the border color for Tkinter widget’s WITHIN the main app window, or changing the background color and stuff.

What I’m looking to do is actually change the windows border color itself. Which I have marked in this picture here enter image description here

I read some stuff concerning ‘Styles’ but it didn’t seem to be what I was looking for. Can anyone help point me to a tutorial for changing this, or explain how it can be done?

Or if there is a question that asked exactly the same question I was asking that is answered point me to it.

Advertisement

Answer

As I see you are using windows.

This color is set by the theme you are currently using. It is the same for every window.

So I cross out the possibility of only using the Tkinter module for this.

Tkinter is responsible for what is in the window but the window manager decides about the border. For example in Ubuntu the window would look totally different.

I guess, you would need some windows specific calls for that.

You can remove the border with root.overrideredirect(1) if I remember correctly.

PS: put “windows” into the tags of this question.

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