我想在wxPython gizmos led上贴个标签,像这样
但我找不到如何在led上做标签
我的代码是这样的。我使用wxpythonstatictext制作了led标签,并调整了位置
import wx.lib.gizmos.ledctrl as led
import wx
class MainFrame(wx.Frame):
def __init__(self):
wx.Frame.__init__(self, parent = None, title= "LED Test", size = (300,200))
self.panel = wx.Panel(self)
self.myLed = led.LEDNumberCtrl(self.panel, -1, size = (100, 30), pos = (100,50))
self.label = wx.StaticText(self.panel, -1, "my LED" , pos=(130,57))
self.myLed.SetBackgroundColour("green")
self.label.SetBackgroundColour("green")
if __name__ == "__main__":
app = wx.App()
frame = MainFrame()
frame.Show()
app.MainLoop()
如何制作gizmos led标签
简而言之,答案是否定的,因为问题是书面的。
它仅限于可以显示的字符
相关问题 更多 >
编程相关推荐