]> git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/wxLEDNumberCtrl.py
corrections to dynamic loading for Darwin
[wxWidgets.git] / wxPython / demo / wxLEDNumberCtrl.py
1
2 from wxPython.wx import *
3 from wxPython.gizmos import *
4
5 import time
6
7 #----------------------------------------------------------------------
8
9 class TestPanel(wxPanel):
10 def __init__(self, parent, log):
11 wxPanel.__init__(self, parent, -1)
12 self.log = log
13
14 led = wxLEDNumberCtrl(self, -1, (25,25), (280, 50))
15 led.SetValue("01234")
16
17 led = wxLEDNumberCtrl(self, -1, (25,100), (280, 50))
18 led.SetValue("56789")
19 led.SetAlignment(wxLED_ALIGN_RIGHT)
20 led.SetDrawFaded(false)
21
22 led = wxLEDNumberCtrl(self, -1, (25,175), (280, 50),
23 wxLED_ALIGN_CENTER)# | wxLED_DRAW_FADED)
24 self.clock = led
25 self.OnTimer(None)
26
27 self.timer = wxTimer(self)
28 self.timer.Start(1000)
29 EVT_TIMER(self, -1, self.OnTimer)
30
31
32 def OnTimer(self, evt):
33 t = time.localtime(time.time())
34 st = time.strftime("%I-%M-%S", t)
35 self.clock.SetValue(st)
36
37
38
39 #----------------------------------------------------------------------
40
41 def runTest(frame, nb, log):
42 win = TestPanel(nb, log)
43 return win
44
45 #----------------------------------------------------------------------
46
47 overview = """\
48 """