]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/wxLEDNumberCtrl.py
2 from wxPython
.wx
import *
3 from wxPython
.gizmos
import *
7 #----------------------------------------------------------------------
9 class TestPanel(wxPanel
):
10 def __init__(self
, parent
, log
):
11 wxPanel
.__init
__(self
, parent
, -1)
14 led
= wxLEDNumberCtrl(self
, -1, (25,25), (280, 50))
15 led
.SetValue("0123456789")
16 led
.SetAlignment(wxLED_ALIGN_RIGHT
)
18 led
= wxLEDNumberCtrl(self
, -1, (25,100), (280, 50))
19 led
.SetValue("0123456789")
20 led
.SetAlignment(wxLED_ALIGN_RIGHT
)
21 led
.SetDrawFaded(false
)
23 led
= wxLEDNumberCtrl(self
, -1, (25,175), (280, 50),
24 wxLED_ALIGN_CENTER
)# | wxLED_DRAW_FADED)
28 self
.timer
= wxTimer(self
)
29 self
.timer
.Start(1000)
30 EVT_TIMER(self
, -1, self
.OnTimer
)
33 def OnTimer(self
, evt
):
34 t
= time
.localtime(time
.time())
35 st
= time
.strftime("%I-%M-%S", t
)
36 self
.clock
.SetValue(st
)
40 #----------------------------------------------------------------------
42 def runTest(frame
, nb
, log
):
43 win
= TestPanel(nb
, log
)
46 #----------------------------------------------------------------------