]> git.saurik.com Git - wxWidgets.git/blob - utils/wxPython/demo/wxGauge.py
it is now possible to add custom buttons into wxHtmlHelpFrame's toolbar
[wxWidgets.git] / utils / wxPython / demo / wxGauge.py
1
2 from wxPython.wx import *
3
4 #----------------------------------------------------------------------
5
6 class TestPanel(wxPanel):
7 def __init__(self, parent, log):
8 wxPanel.__init__(self, parent, -1)
9 self.log = log
10 self.count = 0
11
12 wxStaticText(self, -1, "This example uses the wxGauge control.",
13 wxPoint(45, 15))
14
15 #self.g1 = wxGauge(self, -1, 50, wxPoint(40, 50), wxSize(40, 160),
16 # wxGA_VERTICAL)
17 #self.g1.SetBezelFace(3)
18 #self.g1.SetShadowWidth(3)
19
20 self.g2 = wxGauge(self, -1, 50, wxPoint(110, 50), wxSize(250, 25),
21 wxGA_HORIZONTAL)
22 self.g2.SetBezelFace(5)
23 self.g2.SetShadowWidth(5)
24
25 EVT_IDLE(self, self.IdleHandler)
26
27
28 def IdleHandler(self, event):
29 self.count = self.count + 1
30 if self.count >= 50:
31 self.count = 0
32 #self.g1.SetValue(self.count)
33 self.g2.SetValue(self.count)
34
35
36
37 #----------------------------------------------------------------------
38
39 def runTest(frame, nb, log):
40 win = TestPanel(nb, log)
41 return win
42
43 #----------------------------------------------------------------------
44
45
46
47
48
49
50
51
52
53
54 overview = """\
55 """