]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/wxPrintDialog.py
1 # 11/20/2003 - Jeff Grimmett (grimmtooth@softhome.net)
3 # o Updated for wx namespace
7 #---------------------------------------------------------------------------
9 def runTest(frame
, nb
, log
):
10 data
= wx
.PrintDialogData()
12 data
.EnableSelection(True)
13 data
.EnablePrintToFile(True)
14 data
.EnablePageNumbers(True)
17 data
.SetAllPages(True)
19 dlg
= wx
.PrintDialog(frame
, data
)
21 if dlg
.ShowModal() == wx
.ID_OK
:
22 data
= dlg
.GetPrintDialogData()
23 log
.WriteText('GetAllPages: %d\n' % data
.GetAllPages())
27 #---------------------------------------------------------------------------
31 This class represents the print and print setup common dialogs. You may obtain
32 a wxPrinterDC device context from a successfully dismissed print dialog.
34 User information is stored in a wxPrintDialogData object that is passed to the
35 dialog at creation time, and it is filled in by the user. As with other dialogs,
36 do not use this data once the dialog is dismissed, and do not destroy the dialog
37 until you have everything you need from it.
42 if __name__
== '__main__':
45 run
.main(['', os
.path
.basename(sys
.argv
[0])])