]>
Commit | Line | Data |
---|---|---|
1 | ||
2 | import wx | |
3 | #--------------------------------------------------------------------------- | |
4 | ||
5 | def runTest(frame, nb, log): | |
6 | data = wx.PrintDialogData() | |
7 | ||
8 | data.EnableSelection(True) | |
9 | data.EnablePrintToFile(True) | |
10 | data.EnablePageNumbers(True) | |
11 | data.SetMinPage(1) | |
12 | data.SetMaxPage(5) | |
13 | data.SetAllPages(True) | |
14 | ||
15 | dlg = wx.PrintDialog(frame, data) | |
16 | ||
17 | if dlg.ShowModal() == wx.ID_OK: | |
18 | data = dlg.GetPrintDialogData() | |
19 | log.WriteText('GetAllPages: %d\n' % data.GetAllPages()) | |
20 | ||
21 | dlg.Destroy() | |
22 | ||
23 | #--------------------------------------------------------------------------- | |
24 | ||
25 | ||
26 | overview = """\ | |
27 | This class represents the print and print setup common dialogs. You may obtain | |
28 | a wx.PrinterDC device context from a successfully dismissed print dialog. | |
29 | ||
30 | User information is stored in a wx.PrintDialogData object that is passed to the | |
31 | dialog at creation time, and it is filled in by the user. As with other dialogs, | |
32 | do not use this data once the dialog is dismissed, and do not destroy the dialog | |
33 | until you have everything you need from it. | |
34 | ||
35 | """ | |
36 | ||
37 | ||
38 | if __name__ == '__main__': | |
39 | import sys,os | |
40 | import run | |
41 | run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) |