]>
Commit | Line | Data |
---|---|---|
950e7faf RD |
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("0123456789") | |
16 | led.SetAlignment(wxLED_ALIGN_RIGHT) | |
17 | ||
18 | led = wxLEDNumberCtrl(self, -1, (25,100), (280, 50)) | |
19 | led.SetValue("0123456789") | |
20 | led.SetAlignment(wxLED_ALIGN_RIGHT) | |
21 | led.SetDrawFaded(false) | |
22 | ||
23 | led = wxLEDNumberCtrl(self, -1, (25,175), (280, 50), | |
24 | wxLED_ALIGN_CENTER)# | wxLED_DRAW_FADED) | |
25 | self.clock = led | |
26 | self.OnTimer(None) | |
27 | ||
28 | self.timer = wxTimer(self) | |
29 | self.timer.Start(1000) | |
30 | EVT_TIMER(self, -1, self.OnTimer) | |
31 | ||
32 | ||
33 | def OnTimer(self, evt): | |
34 | t = time.localtime(time.time()) | |
35 | st = time.strftime("%I-%M-%S", t) | |
36 | self.clock.SetValue(st) | |
37 | ||
38 | ||
39 | ||
40 | #---------------------------------------------------------------------- | |
41 | ||
42 | def runTest(frame, nb, log): | |
43 | win = TestPanel(nb, log) | |
44 | return win | |
45 | ||
46 | #---------------------------------------------------------------------- | |
47 | ||
48 | overview = """\ | |
49 | """ |