问题
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..
回答1:
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
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.
来源:https://stackoverflow.com/questions/12006741/wxpython-how-to-change-the-colour-of-gauge-progress-bar-in-windows