]> git.saurik.com Git - wxWidgets.git/blame - wxPython/tests/test_idle.py
fix compilation problem when wxUSE_FSVOLUME==0 after last commit: declare wxIsDriveAv...
[wxWidgets.git] / wxPython / tests / test_idle.py
CommitLineData
6ed100b4
RD
1
2import wx
3
4class TestPanel(wx.Panel):
5 def __init__(self, parent):
6 wx.Panel.__init__(self, parent)
7 self.gauge = wx.Gauge(self, range=100, pos=(20,20), size=(100,-1))
8 self.Bind(wx.EVT_IDLE, self.OnIdle)
9 self.count = 1
10 self.skipNext = False
11
12 def OnIdle(self, evt):
13 if self.skipNext:
14 self.skipNext = False
15 return
16 self.skipNext = True
17
18 print "OnIdle:", self.count
19 #self.gauge.SetValue(self.count)
20 self.count += 1
21 if self.count >= 100:
22 self.count = 1
23
24
25
26app = wx.App(False)
27frm = wx.Frame(None)
28pnl = TestPanel(frm)
29frm.Show()
30app.MainLoop()