Python:Tkinter:如何更改Windows边框颜色? [英] Python: Tkinter: How to change the windows border color?

查看:670
本文介绍了Python:Tkinter:如何更改Windows边框颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从搜索此问题中得到的每个结果都与在主应用程序窗口中更改Tkinter小部件的边框颜色或更改背景颜色和内容有关。

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.

推荐答案

如我所见,您正在使用Windows。

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.

因此,我排除了仅使用Tkinter模块的可能性。

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

Tkinter负责窗口中的内容,但是窗口管理器决定边框。例如,在Ubuntu中,窗口的外观将完全不同。

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.

我想,您需要为此特定的Windows调用。

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

如果我没记错的话,可以使用 root.overrideredirect(1)删除边框。

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

PS :将 windows放入该问题的标签中。

PS: put "windows" into the tags of this question.

这篇关于Python:Tkinter:如何更改Windows边框颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆