]>
Commit | Line | Data |
---|---|---|
1 | ||
2 | from wxPython.wx import * | |
3 | ||
4 | #--------------------------------------------------------------------------- | |
5 | ||
6 | def 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 | ||
33 | overview = """\ | |
34 | """ | |
35 | ||
36 | ||
37 | ||
38 | if __name__ == '__main__': | |
39 | import sys,os | |
40 | import run | |
41 | run.main(['', os.path.basename(sys.argv[0])]) |