.. wxPython Phoenix documentation

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

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

.. include:: headings.inc



.. _wx.ItemAttr:

==========================================================================================================================================
|phoenix_title|  **wx.ItemAttr**
==========================================================================================================================================

Represents the attributes (colour, font, ...) of an item of a control with multiple items such as e.g.          

:ref:`wx.ListCtrl`. 







         



.. versionadded:: 4.1/wxWidgets-3.1.1  
   (previous versions had a similar ListItemAttr class)   







.. seealso:: :ref:`ListCtrl Overview <listctrl 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>ItemAttr</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.ItemAttr_inheritance.png" alt="Inheritance diagram of ItemAttr" 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.ItemAttr.html" title="wx.ItemAttr" alt="" coords="5,5,104,35"/> </map> 
   </p>
   </div>

|


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

================================================================================ ================================================================================
:meth:`~wx.ItemAttr.__init__`                                                    Default Constructor.
:meth:`~wx.ItemAttr.GetBackgroundColour`                                         Returns the currently set background colour.
:meth:`~wx.ItemAttr.GetFont`                                                     Returns the currently set font.
:meth:`~wx.ItemAttr.GetTextColour`                                               Returns the currently set text colour.
:meth:`~wx.ItemAttr.HasBackgroundColour`                                         Returns ``True`` if the currently set background colour is valid.
:meth:`~wx.ItemAttr.HasColours`                                                  Returns ``True`` if either text or background colour is set.
:meth:`~wx.ItemAttr.HasFont`                                                     Returns ``True`` if the currently set font is valid.
:meth:`~wx.ItemAttr.HasTextColour`                                               Returns ``True`` if the currently set text colour is valid.
:meth:`~wx.ItemAttr.IsDefault`                                                   Returns ``True`` if this object has no custom attributes set.
:meth:`~wx.ItemAttr.SetBackgroundColour`                                         Sets a new background colour.
:meth:`~wx.ItemAttr.SetFont`                                                     Sets a new font.
:meth:`~wx.ItemAttr.SetTextColour`                                               Sets a new text colour.
:meth:`~wx.ItemAttr.__ne__`                                                      Compare two item attributes for inequality.
:meth:`~wx.ItemAttr.__eq__`                                                      Compare two item attributes for equality.
================================================================================ ================================================================================


|


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

================================================================================ ================================================================================
:attr:`~wx.ItemAttr.BackgroundColour`                                            See :meth:`~wx.ItemAttr.GetBackgroundColour` and :meth:`~wx.ItemAttr.SetBackgroundColour`
:attr:`~wx.ItemAttr.Font`                                                        See :meth:`~wx.ItemAttr.GetFont` and :meth:`~wx.ItemAttr.SetFont`
:attr:`~wx.ItemAttr.TextColour`                                                  See :meth:`~wx.ItemAttr.GetTextColour` and :meth:`~wx.ItemAttr.SetTextColour`
================================================================================ ================================================================================


|


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


.. class:: wx.ItemAttr(object)

   **Possible constructors**::

       ItemAttr()
       
       ItemAttr(colText, colBack, font)
       
   
   Represents the attributes (colour, font, ...) of an item of a control
   with multiple items such as e.g.



   .. method:: __init__(self, *args, **kw)



      |overload| Overloaded Implementations:

      :html:`<hr class="overloadsep" /><br />`

      
      **__init__** `(self)`
      
      Default Constructor.                   
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`

      
      **__init__** `(self, colText, colBack, font)`
      
      Construct a :ref:`wx.ItemAttr`  with the specified foreground and background colours and font.                  
      
      
      :param `colText`: 
      :type `colText`: wx.Colour
      :param `colBack`: 
      :type `colBack`: wx.Colour
      :param `font`: 
      :type `font`: wx.Font
      
      
      
      
      
      
      :html:`<hr class="overloadsep" /><br />`






   .. method:: GetBackgroundColour(self)

      Returns the currently set background colour.                  

      :rtype: :ref:`wx.Colour`








   .. method:: GetFont(self)

      Returns the currently set font.                  

      :rtype: :ref:`wx.Font`








   .. method:: GetTextColour(self)

      Returns the currently set text colour.                  

      :rtype: :ref:`wx.Colour`








   .. method:: HasBackgroundColour(self)

      Returns ``True`` if the currently set background colour is valid.                  

      :rtype: `bool`








   .. method:: HasColours(self)

      Returns ``True`` if either text or background colour is set.                  

                

      :rtype: `bool`







      .. seealso:: :meth:`HasBackgroundColour` , :meth:`HasTextColour`     








   .. method:: HasFont(self)

      Returns ``True`` if the currently set font is valid.                  

      :rtype: `bool`








   .. method:: HasTextColour(self)

      Returns ``True`` if the currently set text colour is valid.                  

      :rtype: `bool`








   .. method:: IsDefault(self)

      Returns ``True`` if this object has no custom attributes set.                  

      :rtype: `bool`








   .. method:: SetBackgroundColour(self, colour)

      Sets a new background colour.                  


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







   .. method:: SetFont(self, font)

      Sets a new font.                  


      :param `font`: 
      :type `font`: wx.Font







   .. method:: SetTextColour(self, colour)

      Sets a new text colour.                  


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







   .. method:: __ne__(self)

      Compare two item attributes for inequality.                  


      :param `other`: 
      :type `other`: wx.ItemAttr







   .. method:: __eq__(self)

      Compare two item attributes for equality.                  


      :param `other`: 
      :type `other`: wx.ItemAttr







   .. attribute:: BackgroundColour

      See :meth:`~wx.ItemAttr.GetBackgroundColour` and :meth:`~wx.ItemAttr.SetBackgroundColour`


   .. attribute:: Font

      See :meth:`~wx.ItemAttr.GetFont` and :meth:`~wx.ItemAttr.SetFont`


   .. attribute:: TextColour

      See :meth:`~wx.ItemAttr.GetTextColour` and :meth:`~wx.ItemAttr.SetTextColour`

