.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2020 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc



.. _wx.PrintDialog:

==========================================================================================================================================
|phoenix_title|  **wx.PrintDialog**
==========================================================================================================================================

This class represents the print and print setup common dialogs.          

You may obtain a :ref:`wx.PrinterDC`  device context from a successfully dismissed print dialog. 





         



.. seealso:: :ref:`Printing Framework Overview <printing framework overview>`, :ref:`PrintDialog Overview <printdialog overview>`    







|

|class_hierarchy| Class Hierarchy
=================================

.. raw:: html

   <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
   <img id="toggleBlock-trigger" src="_static/images/closed.png"/>
   Inheritance diagram for class <strong>PrintDialog</strong>:
   </div>
   <div id="toggleBlock-summary" style="display:block;"></div>
   <div id="toggleBlock-content" style="display:none;">
   <p class="graphviz">
   <center><img src="_static/images/inheritance/wx.PrintDialog_inheritance.png" alt="Inheritance diagram of PrintDialog" usemap="#dummy" class="inheritance"/></center>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.PrintDialog.html" title="wx.PrintDialog" alt="" coords="5,83,123,112"/> <area shape="rect" id="node2" href="wx.Object.html" title="wx.Object" alt="" coords="21,5,107,35"/> </map> 
   </p>
   </div>

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.PrintDialog.__init__`                                                 Constructor.
:meth:`~wx.PrintDialog.GetPrintDC`                                               Returns the device context created by the print dialog, if any.
:meth:`~wx.PrintDialog.GetPrintData`                                             Returns the :ref:`print data <print data>`  associated with the print dialog.
:meth:`~wx.PrintDialog.GetPrintDialogData`                                       Returns the :ref:`print dialog data <print dialog data>`  associated with the print dialog.
:meth:`~wx.PrintDialog.ShowModal`                                                Shows the dialog, returning  ``ID_OK``   if the user pressed ``wx.OK``, and   ``ID_CANCEL``   otherwise.
================================================================================ ================================================================================


|


|property_summary| Properties Summary
=====================================

================================================================================ ================================================================================
:attr:`~wx.PrintDialog.PrintDC`                                                  See :meth:`~wx.PrintDialog.GetPrintDC`
:attr:`~wx.PrintDialog.PrintData`                                                See :meth:`~wx.PrintDialog.GetPrintData`
:attr:`~wx.PrintDialog.PrintDialogData`                                          See :meth:`~wx.PrintDialog.GetPrintDialogData`
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: wx.PrintDialog(Object)

   **Possible constructors**::

       PrintDialog(parent, data=None)
       
       PrintDialog(parent, data)
       
   
   This class represents the print and print setup common dialogs.



   .. method:: __init__(self, *args, **kw)



      |overload| Overloaded Implementations:

      :html:`<hr class="overloadsep" /><br />`

      
      **__init__** `(self, parent, data=None)`
      
      Constructor.                  
      
      Pass a parent window, and optionally a pointer to a block of print data, which will be copied to the print dialog's print data. 
      
                      
      
      
      :param `parent`: 
      :type `parent`: wx.Window
      :param `data`: 
      :type `data`: wx.PrintDialogData
      
      
      
      
      
      
      .. seealso:: :ref:`wx.PrintDialogData`    
      
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **__init__** `(self, parent, data)`
      
      
      
      
      :param `parent`: 
      :type `parent`: wx.Window
      :param `data`: 
      :type `data`: wx.PrintData
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






   .. method:: GetPrintDC(self)

      Returns the device context created by the print dialog, if any.                  

      When this function has been called, the ownership of the device context is transferred to the application, so it must then be deleted explicitly.                  

      :rtype: :ref:`wx.DC`








   .. method:: GetPrintData(self)

      Returns the :ref:`print data <print data>`  associated with the print dialog.                  

      :rtype: :ref:`wx.PrintData`








   .. method:: GetPrintDialogData(self)

      Returns the :ref:`print dialog data <print dialog data>`  associated with the print dialog.                  

      :rtype: :ref:`wx.PrintDialogData`








   .. method:: ShowModal(self)

      Shows the dialog, returning  ``ID_OK``   if the user pressed ``wx.OK``, and   ``ID_CANCEL``   otherwise.                   

      After this function is called, a device context may be retrievable using :meth:`GetPrintDC` .                  

      :rtype: `int`








   .. attribute:: PrintDC

      See :meth:`~wx.PrintDialog.GetPrintDC`


   .. attribute:: PrintData

      See :meth:`~wx.PrintDialog.GetPrintData`


   .. attribute:: PrintDialogData

      See :meth:`~wx.PrintDialog.GetPrintDialogData`

