.. 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.FontDialog: ========================================================================================================================================== |phoenix_title| **wx.FontDialog** ========================================================================================================================================== This class represents the font chooser dialog. .. seealso:: :ref:`FontDialog Overview `, :ref:`wx.FontData`, `wx.GetFontFromUser` | |class_hierarchy| Class Hierarchy ================================= .. raw:: html
Inheritance diagram for class FontDialog:
| |appearance| Control Appearance =============================== | .. figure:: _static/images/widgets/fullsize/wxmsw/wx.fontdialog.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.fontdialog.png :alt: wxGTK :figclass: floatcenter **wxGTK** | |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~wx.FontDialog.__init__` Default constructor. :meth:`~wx.FontDialog.Create` Creates the dialog if the :ref:`wx.FontDialog` object had been initialized using the default constructor. :meth:`~wx.FontDialog.GetClassDefaultAttributes` :meth:`~wx.FontDialog.GetFontData` Returns the :ref:`font data ` associated with the font dialog. :meth:`~wx.FontDialog.ShowModal` Shows the dialog, returning ``ID_OK`` if the user pressed Ok, and ``ID_CANCEL`` otherwise. ================================================================================ ================================================================================ | |property_summary| Properties Summary ===================================== ================================================================================ ================================================================================ :attr:`~wx.FontDialog.FontData` See :meth:`~wx.FontDialog.GetFontData` ================================================================================ ================================================================================ | |api| Class API =============== .. class:: wx.FontDialog(Dialog) **Possible constructors**:: FontDialog() FontDialog(parent) FontDialog(parent, data) This class represents the font chooser dialog. .. method:: __init__(self, *args, **kw) |overload| Overloaded Implementations: :html:`

` **__init__** `(self)` Default constructor. :meth:`Create` must be called before the dialog can be shown. :html:`

` **__init__** `(self, parent)` Constructor with parent window. :param `parent`: :type `parent`: wx.Window :html:`

` **__init__** `(self, parent, data)` Constructor. Pass a parent window, and the :ref:`font data ` object to be used to initialize the dialog controls. :param `parent`: :type `parent`: wx.Window :param `data`: :type `data`: wx.FontData :html:`

` .. method:: Create(self, *args, **kw) Creates the dialog if the :ref:`wx.FontDialog` object had been initialized using the default constructor. :returns: ``True`` on success and ``False`` if an error occurred. |overload| Overloaded Implementations: :html:`

` **Create** `(self, parent)` :param `parent`: :type `parent`: wx.Window :rtype: `bool` :html:`

` **Create** `(self, parent, data)` :param `parent`: :type `parent`: wx.Window :param `data`: :type `data`: wx.FontData :rtype: `bool` :html:`

` .. staticmethod:: GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL) :param `variant`: :type `variant`: wx.WindowVariant :rtype: :ref:`wx.VisualAttributes` .. method:: GetFontData(self) Returns the :ref:`font data ` associated with the font dialog. :rtype: :ref:`wx.FontData` .. method:: ShowModal(self) Shows the dialog, returning ``ID_OK`` if the user pressed Ok, and ``ID_CANCEL`` otherwise. If the user cancels the dialog (ShowModal returns ``ID_CANCEL`` ), no font will be created. If the user presses ``wx.OK``, a new :ref:`wx.Font` will be created and stored in the font dialog's :ref:`wx.FontData` structure. :rtype: `int` .. seealso:: :meth:`GetFontData` .. attribute:: FontData See :meth:`~wx.FontDialog.GetFontData`