]> git.saurik.com Git - wxWidgets.git/blame_incremental - wxPython/demo/wxProgressDialog.py
adjusting to changes in xti.h
[wxWidgets.git] / wxPython / demo / wxProgressDialog.py
... / ...
CommitLineData
1
2from wxPython.wx import *
3
4#---------------------------------------------------------------------------
5
6def runTest(frame, nb, log):
7 max = 20
8 dlg = wxProgressDialog("Progress dialog example",
9 "An informative message",
10 max,
11 frame,
12 wxPD_CAN_ABORT | wxPD_APP_MODAL)
13
14 keepGoing = True
15 count = 0
16 while keepGoing and count < max:
17 count = count + 1
18 wxSleep(1)
19
20 if count == max / 2:
21 keepGoing = dlg.Update(count, "Half-time!")
22 else:
23 keepGoing = dlg.Update(count)
24
25 dlg.Destroy()
26
27
28#---------------------------------------------------------------------------
29
30
31
32
33overview = """\
34"""
35
36
37
38if __name__ == '__main__':
39 import sys,os
40 import run
41 run.main(['', os.path.basename(sys.argv[0])])