.. 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.svg" 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="This class represents the print and print setup common dialogs." alt="" coords="5,82,138,111"/> <area shape="rect" id="node2" href="wx.Object.html" title="This is the root class of many of the wxWidgets classes." alt="" coords="22,5,121,34"/> </map> </p> </div> | |appearance| Control Appearance =============================== | .. container:: control-appearance-figures .. figure:: _static/images/widgets/fullsize/wxmsw/wx.printdialog.png :alt: wxMSW :figclass: appearance-figure **wxMSW** .. figure:: _static/images/widgets/fullsize/wxmac/../no_appearance.png :alt: wxMAC :figclass: appearance-figure **wxMAC** .. figure:: _static/images/widgets/fullsize/wxgtk/wx.printdialog.png :alt: wxGTK :figclass: appearance-figure **wxGTK** | |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 : Window, data: Optional[PrintDialogData]=None) -> None PrintDialog(parent : Window, data : PrintData) -> None 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 : Window, data: Optional[PrintDialogData]=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 :rtype: `None` .. seealso:: :ref:`wx.PrintDialogData` :html:`<hr class="overloadsep" /><br />` **__init__** `(self, parent : Window, data : PrintData)` :param `parent`: :type `parent`: wx.Window :param `data`: :type `data`: wx.PrintData :rtype: `None` :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`