.. 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.grid.GridHeaderLabelsRenderer:

==========================================================================================================================================
|phoenix_title|  **wx.grid.GridHeaderLabelsRenderer**
==========================================================================================================================================

Base class for header cells renderers.          

A cell renderer can be used to draw the text of a cell's label, and/or the border around it. 

         



.. versionadded:: 2.9.1 
     







|

|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>GridHeaderLabelsRenderer</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.grid.GridHeaderLabelsRenderer_inheritance.png" alt="Inheritance diagram of GridHeaderLabelsRenderer" 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.grid.GridHeaderLabelsRenderer.html" title="wx.grid.GridHeaderLabelsRenderer" alt="" coords="5,5,253,35"/> </map> 
   </p>
   </div>

|


|sub_classes| Known Subclasses
==============================

:ref:`wx.grid.GridColumnHeaderRenderer`, :ref:`wx.grid.GridCornerHeaderRenderer`, :ref:`wx.grid.GridRowHeaderRenderer`

|


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

================================================================================ ================================================================================
:meth:`~wx.grid.GridHeaderLabelsRenderer.DrawBorder`                             Called by the grid to draw the border around the cell header.
:meth:`~wx.grid.GridHeaderLabelsRenderer.DrawLabel`                              Called by the grid to draw the specified label.
================================================================================ ================================================================================


|


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


.. class:: wx.grid.GridHeaderLabelsRenderer(object)

   Base class for header cells renderers.



   .. method:: DrawBorder(self, grid, dc, rect)

      Called by the grid to draw the border around the cell header.                  

      This method is responsible for drawing the border inside the given `rect`  and adjusting the rectangle size to correspond to the area inside the border, i.e. usually call :meth:`wx.Rect.Deflate`   to account for the border width. 




      :param `grid`: The grid whose header cell window is being drawn.   
      :type `grid`: wx.grid.Grid
      :param `dc`: The device context to use for drawing.   
      :type `dc`: wx.DC
      :param `rect`: Input/output parameter which contains the border rectangle on input and should be updated to contain the area inside the border on function return.   
      :type `rect`: wx.Rect








                  





   .. method:: DrawLabel(self, grid, dc, value, rect, horizAlign, vertAlign, textOrientation)

      Called by the grid to draw the specified label.                  

      Notice that the :meth:`DrawBorder`   method is called before this one. 

      The default implementation uses :meth:`wx.grid.Grid.GetLabelTextColour`   and :meth:`wx.grid.Grid.GetLabelFont`   to draw the label.                  


      :param `grid`: 
      :type `grid`: wx.grid.Grid
      :param `dc`: 
      :type `dc`: wx.DC
      :param `value`: 
      :type `value`: string
      :param `rect`: 
      :type `rect`: wx.Rect
      :param `horizAlign`: 
      :type `horizAlign`: int
      :param `vertAlign`: 
      :type `vertAlign`: int
      :param `textOrientation`: 
      :type `textOrientation`: int






