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

南笙酒味 提交于 2019-12-24 12:19:25

问题


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

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.


回答1:


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.



来源:https://stackoverflow.com/questions/17251016/python-tkinter-how-to-change-the-windows-border-color

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!