.. wxPython Phoenix documentation

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

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

.. include:: headings.inc



.. _wx.ColourData:

==========================================================================================================================================
|phoenix_title|  **wx.ColourData**
==========================================================================================================================================

This class holds a variety of information related to colour dialogs.          







         



.. seealso:: :ref:`wx.Colour`, :ref:`wx.ColourDialog`, :ref:`ColourDialog Overview <colourdialog 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>ColourData</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.ColourData_inheritance.png" alt="Inheritance diagram of ColourData" usemap="#dummy" class="inheritance"/></center>
   </div>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.ColourData.html" title="wx.ColourData" alt="" coords="5,83,120,112"/> <area shape="rect" id="node2" href="wx.Object.html" title="wx.Object" alt="" coords="21,5,103,35"/> </map> 
   </p>

|


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

================================================================================ ================================================================================
:meth:`~wx.ColourData.__init__`                                                  Constructor.
:meth:`~wx.ColourData.FromString`                                                Decodes the given string, which should be in the same format returned by :ref:`wx.ToString`, and sets the internal colours.
:meth:`~wx.ColourData.GetChooseFull`                                             Under Windows, determines whether the Windows colour dialog will display the full dialog with custom colour selection controls.
:meth:`~wx.ColourData.GetColour`                                                 Gets the current colour associated with the colour dialog.
:meth:`~wx.ColourData.GetCustomColour`                                           Returns custom colours associated with the colour dialog.
:meth:`~wx.ColourData.SetChooseFull`                                             Under Windows, tells the Windows colour dialog to display the full dialog with custom colour selection controls.
:meth:`~wx.ColourData.SetColour`                                                 Sets the default colour for the colour dialog.
:meth:`~wx.ColourData.SetCustomColour`                                           Sets custom colours for the colour dialog.
:meth:`~wx.ColourData.ToString`                                                  Converts the colours saved in this class in a string form, separating the various colours with a comma.
================================================================================ ================================================================================


|


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

================================================================================ ================================================================================
:attr:`~wx.ColourData.ChooseFull`                                                See :meth:`~wx.ColourData.GetChooseFull` and :meth:`~wx.ColourData.SetChooseFull`
:attr:`~wx.ColourData.Colour`                                                    See :meth:`~wx.ColourData.GetColour` and :meth:`~wx.ColourData.SetColour`
================================================================================ ================================================================================


|


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


.. class:: wx.ColourData(Object)

   **Possible constructors**::

       ColourData()
       
   
   This class holds a variety of information related to colour dialogs.



   .. method:: __init__(self)

      Constructor.                  

      Initializes the custom colours to  ``NullColour`` , the  `data`  colour setting to black, and the `choose`  full setting to ``True``.                   





   .. method:: FromString(self, str)

      Decodes the given string, which should be in the same format returned by :ref:`wx.ToString`, and sets the internal colours.                  


      :param `str`: 
      :type `str`: string




      :rtype: `bool`








   .. method:: GetChooseFull(self)

      Under Windows, determines whether the Windows colour dialog will display the full dialog with custom colour selection controls.                  

      Has no meaning under other platforms. 

      The default value is ``True``.                  

      :rtype: `bool`








   .. method:: GetColour(self)

      Gets the current colour associated with the colour dialog.                  

      The default colour is black.                  

      :rtype: :ref:`wx.Colour`








   .. method:: GetCustomColour(self, i)

      Returns custom colours associated with the colour dialog.                  




      :param `i`: An integer between 0 and 15, being any of the 15 custom colours that the user has saved. The default custom colours are invalid colours.   
      :type `i`: int






      :rtype: :ref:`wx.Colour`



                  





   .. method:: SetChooseFull(self, flag)

      Under Windows, tells the Windows colour dialog to display the full dialog with custom colour selection controls.                  

      Under other platforms, has no effect. 

      The default value is ``True``.                  


      :param `flag`: 
      :type `flag`: bool







   .. method:: SetColour(self, colour)

      Sets the default colour for the colour dialog.                  

      The default colour is black.                  


      :param `colour`: 
      :type `colour`: wx.Colour







   .. method:: SetCustomColour(self, i, colour)

      Sets custom colours for the colour dialog.                  




      :param `i`: An integer between 0 and 15 for whatever custom colour you want to set. The default custom colours are invalid colours.   
      :type `i`: int
      :param `colour`: The colour to set   
      :type `colour`: wx.Colour






                  





   .. method:: ToString(self)

      Converts the colours saved in this class in a string form, separating the various colours with a comma.                  

      :rtype: `string`








   .. attribute:: ChooseFull

      See :meth:`~wx.ColourData.GetChooseFull` and :meth:`~wx.ColourData.SetChooseFull`


   .. attribute:: Colour

      See :meth:`~wx.ColourData.GetColour` and :meth:`~wx.ColourData.SetColour`

