]> git.saurik.com Git - wxWidgets.git/blame_incremental - wxPython/samples/wxPIA_book/Chapter-07/gauge.py
fix building/running of tex2rtf
[wxWidgets.git] / wxPython / samples / wxPIA_book / Chapter-07 / gauge.py
... / ...
CommitLineData
1import wx
2
3class GaugeFrame(wx.Frame):
4 def __init__(self):
5 wx.Frame.__init__(self, None, -1, 'Gauge Example',
6 size=(350, 150))
7 panel = wx.Panel(self, -1)
8 self.count = 0
9 self.gauge = wx.Gauge(panel, -1, 50, (20, 50), (250, 25))
10 self.gauge.SetBezelFace(3)
11 self.gauge.SetShadowWidth(3)
12 self.Bind(wx.EVT_IDLE, self.OnIdle)
13
14 def OnIdle(self, event):
15 self.count = self.count + 1
16 if self.count >= 50:
17 self.count = 0
18 self.gauge.SetValue(self.count)
19
20if __name__ == '__main__':
21 app = wx.PySimpleApp()
22 GaugeFrame().Show()
23 app.MainLoop()