]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/wxGauge.py
2 from wxPython
.wx
import *
4 #----------------------------------------------------------------------
6 class TestPanel(wxPanel
):
7 def __init__(self
, parent
, log
):
8 wxPanel
.__init
__(self
, parent
, -1)
12 wxStaticText(self
, -1, "This example uses the wxGauge control.",
15 #self.g1 = wxGauge(self, -1, 50, wxPoint(40, 50), wxSize(40, 160),
17 #self.g1.SetBezelFace(3)
18 #self.g1.SetShadowWidth(3)
20 self
.g2
= wxGauge(self
, -1, 50, wxPoint(110, 50), wxSize(250, 25),
22 self
.g2
.SetBezelFace(5)
23 self
.g2
.SetShadowWidth(5)
25 EVT_IDLE(self
, self
.IdleHandler
)
28 def IdleHandler(self
, event
):
29 self
.count
= self
.count
+ 1
32 #self.g1.SetValue(self.count)
33 self
.g2
.SetValue(self
.count
)
37 #----------------------------------------------------------------------
39 def runTest(frame
, nb
, log
):
40 win
= TestPanel(nb
, log
)
43 #----------------------------------------------------------------------