]>
git.saurik.com Git - wxWidgets.git/blob - wxPython/demo/PrintDialog.py
   3 #--------------------------------------------------------------------------- 
   5 def runTest(frame
, nb
, log
): 
   6     data 
= wx
.PrintDialogData() 
   8     data
.EnableSelection(True) 
   9     data
.EnablePrintToFile(True) 
  10     data
.EnablePageNumbers(True) 
  13     data
.SetAllPages(True) 
  15     dlg 
= wx
.PrintDialog(frame
, data
) 
  17     if dlg
.ShowModal() == wx
.ID_OK
: 
  18         data 
= dlg
.GetPrintDialogData() 
  19         log
.WriteText('GetAllPages: %d\n' % data
.GetAllPages()) 
  23 #--------------------------------------------------------------------------- 
  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. 
  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. 
  38 if __name__ 
== '__main__': 
  41     run
.main(['', os
.path
.basename(sys
.argv
[0])] + sys
.argv
[1:])