.. 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 `, :ref:`PrintDialog Overview ` | |class_hierarchy| Class Hierarchy ================================= .. raw:: html
Inheritance diagram for class PrintDialog:
| |appearance| Control Appearance =============================== | .. figure:: _static/images/widgets/fullsize/wxmsw/wx.printdialog.png :alt: wxMSW :figclass: floatleft **wxMSW** .. figure:: _static/images/widgets/fullsize/wxmac/../no_appearance.png :alt: wxMAC :figclass: floatright **wxMAC** .. figure:: _static/images/widgets/fullsize/wxgtk/wx.printdialog.png :alt: wxGTK :figclass: floatcenter **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 ` associated with the print dialog. :meth:`~wx.PrintDialog.GetPrintDialogData` Returns the :ref:`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:`

` **__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:`

` **__init__** `(self, parent, data)` :param `parent`: :type `parent`: wx.Window :param `data`: :type `data`: wx.PrintData :html:`

` .. 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 ` associated with the print dialog. :rtype: :ref:`wx.PrintData` .. method:: GetPrintDialogData(self) Returns the :ref:`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`