Tkinter – 是否可以更改ttk.Sizegrip小部件的颜色?

huangapple go评论57阅读模式
英文:

Tkinter - Is it possibile to change the color of the ttk.Sizegrip widget?

问题

在我的代码中,我尝试使用以下指令更改此ttk小部件的颜色,但没有任何反应:

self.style.configure("TSizegrip", bg="red")
英文:

in my code I tried to change the color of this ttk widget using the following instruction, but nothing happened:

self.style.configure("TSizegrip", bg="red")

答案1

得分: 1

使用background代替bg

self.style.configure("TSizegrip", background="red")

Tkinter – 是否可以更改ttk.Sizegrip小部件的颜色?

英文:

Use background instead of bg:

self.style.configure("TSizegrip", background="red")

Tkinter – 是否可以更改ttk.Sizegrip小部件的颜色?

huangapple
  • 本文由 发表于 2023年5月25日 05:05:39
  • 转载请务必保留本文链接:https://go.coder-hub.com/76327399.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定