]> git.saurik.com Git - wxWidgets.git/blame - wxPython/demo/wxGauge.py
regenerated after adding DEBUG_ options
[wxWidgets.git] / wxPython / demo / wxGauge.py
CommitLineData
cf694132
RD
1
2from wxPython.wx import *
3
4#----------------------------------------------------------------------
5
6class TestPanel(wxPanel):
7 def __init__(self, parent, log):
8 wxPanel.__init__(self, parent, -1)
9 self.log = log
10 self.count = 0
11
c368d904 12 wxStaticText(self, -1, "This example shows the wxGauge control.",
cf694132
RD
13 wxPoint(45, 15))
14
c368d904
RD
15 self.g1 = wxGauge(self, -1, 50, wxPoint(110, 50), wxSize(250, 25))
16 self.g1.SetBezelFace(3)
17 self.g1.SetShadowWidth(3)
cf694132 18
c368d904
RD
19 self.g2 = wxGauge(self, -1, 50, wxPoint(110, 95), wxSize(250, 25),
20 wxGA_HORIZONTAL|wxGA_SMOOTH)
cf694132
RD
21 self.g2.SetBezelFace(5)
22 self.g2.SetShadowWidth(5)
23
24 EVT_IDLE(self, self.IdleHandler)
25
26
27 def IdleHandler(self, event):
28 self.count = self.count + 1
29 if self.count >= 50:
30 self.count = 0
c368d904 31 self.g1.SetValue(self.count)
cf694132
RD
32 self.g2.SetValue(self.count)
33
34
35
36#----------------------------------------------------------------------
37
38def runTest(frame, nb, log):
39 win = TestPanel(nb, log)
40 return win
41
42#----------------------------------------------------------------------
43
44
45
46
47
48
49
50
51
52
53overview = """\
54"""
1fded56b
RD
55
56
57
58
59if __name__ == '__main__':
60 import sys,os
61 import run
62 run.main(['', os.path.basename(sys.argv[0])])
63