Advertisement
Guest User

TerabyteST

a guest
Aug 5th, 2009
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.61 KB | None | 0 0
  1. import wx
  2.  
  3. class 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.Bind(wx.EVT_IDLE, self.OnIdle)
  11.        
  12.     def OnIdle(self, event):
  13.         self.count = self.count + 1
  14.         if self.count >= 50:
  15.             self.count = 0
  16.         self.gauge.SetValue(self.count)
  17.  
  18. if __name__ == "__main__":
  19.     app = wx.PySimpleApp()
  20.     GaugeFrame().Show()
  21.     app.MainLoop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement