简体   繁体   English

Python:Tkinter:如何更改Windows边框颜色?

[英]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. 我从搜索此问题中获得的每个结果都与在主应用程序窗口中更改Tkinter小部件的边框颜色或更改背景颜色和内容有关。

What I'm looking to do is actually change the windows border color itself. 我要做的实际上是更改Windows边框颜色本身。 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. 或者,如果有一个问题问的与我所问的问题完全相同,请回答。

As I see you are using windows. 如我所见,您正在使用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模块的可能性。

Tkinter is responsible for what is in the window but the window manager decides about the border. Tkinter负责窗口中的内容,但窗口管理器决定边框。 For example in Ubuntu the window would look totally different. 例如,在Ubuntu中,窗口看起来会完全不同。

I guess, you would need some windows specific calls for that. 我猜想,您需要为此特定的Windows调用。

You can remove the border with root.overrideredirect(1) if I remember correctly. 如果我没记错的话,可以使用root.overrideredirect(1)删除边框。

PS: put "windows" into the tags of this question. PS:将“ windows”放入该问题的标签中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM