.. 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

Inheritance diagram for class
GridHeaderLabelsRenderer:
|
|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 : Grid, dc : DC, rect : 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
:rtype: `None`
.. method:: DrawLabel(self, grid : Grid, dc : DC, value : str, rect : Rect, horizAlign : int, vertAlign : int, textOrientation : int)
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
:rtype: `None`