.. include:: headings.inc .. _ColourDialog: ========================================================================================================================================== |phoenix_title| **ColourDialog** ========================================================================================================================================== This class represents the colour chooser dialog. .. seealso:: :ref:`ColourDialog Overview `, :ref:`Colour`, :ref:`ColourData`, :func:`GetColourFromUser` | |class_hierarchy| Inheritance Diagram ===================================== Inheritance diagram for class **ColourDialog** .. raw:: html

Inheritance diagram of ColourDialog

| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~ColourDialog.__init__` Constructor. :meth:`~ColourDialog.Create` Same as :ref:`ColourDialog` . :meth:`~ColourDialog.GetColourData` Returns the colour data associated with the colour dialog. :meth:`~ColourDialog.ShowModal` Shows the dialog, returning ``ID_OK`` if the user pressed ``OK``, and ``ID_CANCEL`` otherwise. ================================================================================ ================================================================================ | |property_summary| Properties Summary ===================================== ================================================================================ ================================================================================ :attr:`~ColourDialog.ColourData` See :meth:`~ColourDialog.GetColourData` ================================================================================ ================================================================================ | |api| Class API =============== .. class:: ColourDialog(Dialog) This class represents the colour chooser dialog. **Possible constructors**:: ColourDialog(parent, data=None) .. method:: __init__(self, parent, data=None) Constructor. Pass a parent window, and optionally a pointer to a block of colour data, which will be copied to the colour dialog's colour data. Custom colours from colour data object will be used in the dialog's colour palette. Invalid entries in custom colours list will be ignored on some platforms(GTK) or replaced with white colour on platforms where custom colours palette has fixed size (MSW). :param `parent`: :type `parent`: Window :param `data`: :type `data`: ColourData .. seealso:: :ref:`ColourData` .. method:: Create(self, parent, data=None) Same as :ref:`ColourDialog` . :param `parent`: :type `parent`: Window :param `data`: :type `data`: ColourData :rtype: `bool` .. method:: GetColourData(self) Returns the colour data associated with the colour dialog. :rtype: :ref:`ColourData` .. method:: ShowModal(self) Shows the dialog, returning ``ID_OK`` if the user pressed ``OK``, and ``ID_CANCEL`` otherwise. :rtype: `int` .. attribute:: ColourData See :meth:`~ColourDialog.GetColourData`