Wxpython 如何更改窗口中仪表进度条的颜色 [英] Wxpython How to change the colour of Gauge Progress bar in windows
问题描述
我正在使用 WxPython 作为 Windows 中的 GUI 设计一个 Python 软件.我想更改我的应用程序中仪表进度条的默认颜色.请帮忙...提前致谢..
I am designing a software in Python using WxPython as GUI in Windows.I want to change the default colour of Gauge Progress bar in my application. Please help... Thanks in advance..
推荐答案
您可以尝试 SetForegroundColour 或 SetBackgrounColour 之类的方法,但由于仪表包装了本机小部件,我不确定这些会产生任何影响.幸运的是,有一个名为 PyGauge 的通用仪表部件:wx.lib.agw.pygauge
You can try something like SetForegroundColour or SetBackgrounColour, but since the gauge wraps the native widget, I'm not sure that those will have any effect. Fortunately, there is a generic gauge widget called PyGauge: wx.lib.agw.pygauge
我认为它没有原生的那么漂亮,但你绝对可以改变颜色.wxPython 演示包中有几个 PyGauge 示例.
I don't think it's quite as pretty as the native one, but you can definitely change the color. There are a couple examples of PyGauge in the wxPython demo package.
这篇关于Wxpython 如何更改窗口中仪表进度条的颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!