]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/samples/wxPIA_book/Chapter-09/progress_box.py
   4     def __init__(self
, parent
): 
   5         wx
.Frame
.__init
__(self
, parent
, title
="ProgressDialog sample") 
   9         self
.timer 
= wx
.Timer(self
) 
  10         self
.Bind(wx
.EVT_TIMER
, self
.OnTimer
, self
.timer
) 
  11         self
.timer
.Start(1000) 
  13     def OnTimer(self
, evt
): 
  15             self
.dialog 
= wx
.ProgressDialog("A progress box", "Time remaining", 
  19                                             | wx
.PD_REMAINING_TIME
) 
  22         keepGoing 
= self
.dialog
.Update(self
.count
) 
  23         if not keepGoing 
or self
.count 
== self
.progressMax
: 
  28 if __name__ 
== "__main__": 
  29     app 
= wx
.PySimpleApp()