.. wxPython Phoenix documentation

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

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

.. include:: headings.inc

.. currentmodule:: wx.lib.mixins.listctrl

.. highlight:: python



.. _wx.lib.mixins.listctrl.ListRowHighlighter:

==========================================================================================================================================
|phoenix_title|  **wx.lib.mixins.listctrl.ListRowHighlighter**
==========================================================================================================================================

Editra Control Library: ListRowHighlighter
Mixin class that handles automatic background highlighting of alternate
rows in the a ListCtrl. The background of the rows are highlighted
automatically as items are added or inserted in the control based on the
mixins Mode and set Color. By default the Even rows will be highlighted with
the systems highlight color.



|

|class_hierarchy| Class Hierarchy
=================================

.. raw:: html

   <div class="collabsible-wrapper">
      <input id="collapsible-inheritance" class="collapsible-checkbox" type="checkbox">
      <label for="collapsible-inheritance" tabindex="0" title="Show inheritance diagram" class="collapsible-label">Inheritance diagram for class <strong>ListRowHighlighter</strong>:</label>
      <div class="collapsible-content">
         <p class="graphviz">
            <center><img src="_static/images/inheritance/wx.lib.mixins.listctrl.ListRowHighlighter_inheritance.svg" alt="Inheritance diagram of ListRowHighlighter" usemap="#dummy" class="inheritance invert-in-dark-mode"/></center>
            <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.lib.mixins.listctrl.ListRowHighlighter.html" title="Editra Control Library: ListRowHighlighter" alt="" coords="5,5,310,34"/> </map> 
         </p>
      </div>
   </div>
   <script type="text/javascript" src="_static/inheritancetoggle.js"></script>



|


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

================================================================================ ================================================================================
:meth:`~wx.lib.mixins.listctrl.ListRowHighlighter.__init__`                      Initialize the highlighter mixin
:meth:`~wx.lib.mixins.listctrl.ListRowHighlighter.RefreshRows`                   Re-color all the rows
:meth:`~wx.lib.mixins.listctrl.ListRowHighlighter.SetHighlightColor`             Set the color used to highlight the rows. Call :meth:`~wx.lib.mixins.listctrl.ListRowHighlighter.RefreshRows` after
:meth:`~wx.lib.mixins.listctrl.ListRowHighlighter.SetHighlightMode`              Set the highlighting mode to either HIGHLIGHT_EVEN or to
================================================================================ ================================================================================


|


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


.. class:: ListRowHighlighter

   Editra Control Library: ListRowHighlighter
   Mixin class that handles automatic background highlighting of alternate
   rows in the a ListCtrl. The background of the rows are highlighted
   automatically as items are added or inserted in the control based on the
   mixins Mode and set Color. By default the Even rows will be highlighted with
   the systems highlight color.

   .. method:: __init__(self, color=None, mode=HIGHLIGHT_EVEN)

      Initialize the highlighter mixin
      
      :keyword color: Set a custom highlight color (default uses system color)
      :keyword mode: HIGHLIGHT_EVEN (default) or HIGHLIGHT_ODD


   .. method:: RefreshRows(self)

      Re-color all the rows


   .. method:: SetHighlightColor(self, color)

      Set the color used to highlight the rows. Call :meth:`RefreshRows` after
      this if you wish to update all the rows highlight colors.
      
      :param color: wx.Color or None to set default


   .. method:: SetHighlightMode(self, mode)

      Set the highlighting mode to either HIGHLIGHT_EVEN or to
      HIGHLIGHT_ODD. Call :meth:`RefreshRows` afterwards to update the list
      state.
      
      :param mode: HIGHLIGHT_* mode value


