]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/ProgressDialog.py
1 # 11/21/2003 - Jeff Grimmett (grimmtooth@softhome.net)
3 # o Updated for wx namespace
5 # 11/30/2003 - Jeff Grimmett (grimmtooth@softhome.net)
7 # o wx.ProgressDialog appears to be broken. No abort button
8 # and it's not possible to dismiss it otherwise.
13 #---------------------------------------------------------------------------
15 def runTest(frame
, nb
, log
):
18 dlg
= wx
.ProgressDialog("Progress dialog example",
19 "An informative message",
22 style
= wx
.PD_CAN_ABORT | wx
.PD_APP_MODAL
)
27 while keepGoing
and count
< max:
33 keepGoing
= dlg
.Update(count
, "Half-time!")
35 keepGoing
= dlg
.Update(count
)
40 #---------------------------------------------------------------------------
45 This class represents a dialog that shows a short message and a progress bar.
46 Optionally, it can display an ABORT button
48 This dialog indicates the progress of some event that takes a while to accomplish,
49 usually, such as file copy progress, download progress, and so on. The display
50 is <b>completely</b> under control of the program; you must update the dialog from
51 within the program creating it.
53 When the dialog closes, you must check to see if the user aborted the process or
54 not, and act accordingly -- that is, if the PD_CAN_ABORT style flag is set.
55 If not then you may progress blissfully onward.
59 if __name__
== '__main__':
62 run
.main(['', os
.path
.basename(sys
.argv
[0])])