]> git.saurik.com Git - wxWidgets.git/blame - wxPython/demo/wxProgressDialog.py
adjusting to changes in xti.h
[wxWidgets.git] / wxPython / demo / wxProgressDialog.py
CommitLineData
bb0054cd
RD
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
1e4a197e 14 keepGoing = True
bb0054cd 15 count = 0
eb0f373c 16 while keepGoing and count < max:
bb0054cd
RD
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
1fded56b
RD
33overview = """\
34"""
bb0054cd
RD
35
36
37
1fded56b
RD
38if __name__ == '__main__':
39 import sys,os
40 import run
41 run.main(['', os.path.basename(sys.argv[0])])