]>
Commit | Line | Data |
---|---|---|
cf694132 | 1 | |
8fa876ca | 2 | import wx |
cf694132 RD |
3 | #--------------------------------------------------------------------------- |
4 | ||
5 | def runTest(frame, nb, log): | |
8fa876ca | 6 | data = wx.PrintDialogData() |
1fded56b RD |
7 | |
8 | data.EnableSelection(True) | |
1e4a197e RD |
9 | data.EnablePrintToFile(True) |
10 | data.EnablePageNumbers(True) | |
1fded56b RD |
11 | data.SetMinPage(1) |
12 | data.SetMaxPage(5) | |
13 | data.SetAllPages(True) | |
14 | ||
8fa876ca RD |
15 | dlg = wx.PrintDialog(frame, data) |
16 | ||
17 | if dlg.ShowModal() == wx.ID_OK: | |
1fded56b RD |
18 | data = dlg.GetPrintDialogData() |
19 | log.WriteText('GetAllPages: %d\n' % data.GetAllPages()) | |
8fa876ca | 20 | |
cf694132 RD |
21 | dlg.Destroy() |
22 | ||
23 | #--------------------------------------------------------------------------- | |
24 | ||
25 | ||
8fa876ca RD |
26 | overview = """\ |
27 | This class represents the print and print setup common dialogs. You may obtain | |
95bfd958 | 28 | a wx.PrinterDC device context from a successfully dismissed print dialog. |
cf694132 | 29 | |
95bfd958 | 30 | User information is stored in a wx.PrintDialogData object that is passed to the |
8fa876ca RD |
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. | |
cf694132 | 34 | |
1fded56b | 35 | """ |
cf694132 RD |
36 | |
37 | ||
1fded56b RD |
38 | if __name__ == '__main__': |
39 | import sys,os | |
40 | import run | |
41 | run.main(['', os.path.basename(sys.argv[0])]) |