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

.. currentmodule:: wx.lib.agw.ultimatelistctrl

.. highlight:: python



.. _wx.lib.agw.ultimatelistctrl.UltimateListHeaderWindow:

==========================================================================================================================================
|phoenix_title|  **wx.lib.agw.ultimatelistctrl.UltimateListHeaderWindow**
==========================================================================================================================================

This class holds the header window for :class:`UltimateListCtrl`.



|

|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>UltimateListHeaderWindow</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.lib.agw.ultimatelistctrl.UltimateListHeaderWindow_inheritance.png" alt="Inheritance diagram of UltimateListHeaderWindow" 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.Trackable.html" title="wx.Trackable" alt="" coords="75,5,176,35"/> <area shape="rect" id="node2" href="wx.EvtHandler.html" title="wx.EvtHandler" alt="" coords="127,83,237,112"/> <area shape="rect" id="node6" href="wx.WindowBase.html" title="wx.WindowBase" alt="" coords="122,160,243,189"/> <area shape="rect" id="node3" href="wx.Object.html" title="wx.Object" alt="" coords="200,5,281,35"/> <area shape="rect" id="node4" href="wx.Control.html" title="wx.Control" alt="" coords="139,315,227,344"/> <area shape="rect" id="node7" href="wx.lib.agw.ultimatelistctrl.UltimateListHeaderWindow.html" title="wx.lib.agw.ultimatelistctrl.UltimateListHeaderWindow" alt="" coords="5,392,360,421"/> <area shape="rect" id="node5" href="wx.Window.html" title="wx.Window" alt="" coords="138,237,227,267"/> </map> 
   </p>

|


|super_classes| Known Superclasses
==================================

:class:`wx.Control`

|


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

================================================================================ ================================================================================
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListHeaderWindow.__init__`           Default class constructor.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListHeaderWindow.AdjustDC`           Shifts the :class:`wx.DC` origin to match the position of the main window horizontal
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListHeaderWindow.DoGetBestSize`      Gets the size which best suits the window: for a control, it would be the
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListHeaderWindow.DrawCurrent`        Force the redrawing of the column window.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListHeaderWindow.DrawTextFormatted`  Draws the item text, correctly formatted.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListHeaderWindow.GetOwner`           Returns the header window owner, an instance of :class:`UltimateListCtrl`.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListHeaderWindow.GetTextHeight`      Returns the column text height, in pixels.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListHeaderWindow.GetWindowHeight`    Returns the :class:`UltimateListHeaderWindow` height, in pixels.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListHeaderWindow.HandleColumnCheck`  Handles the case in which a column contains a checkbox-like item.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListHeaderWindow.HitTestColumn`      HitTest method for column headers.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListHeaderWindow.IsColumnShown`      Returns ``True`` if the input column is shown, ``False`` if it is hidden.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListHeaderWindow.OnEnterWindow`      Handles the ``wx.EVT_ENTER_WINDOW`` event for :class:`UltimateListHeaderWindow`.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListHeaderWindow.OnInternalIdle`     This method is normally only used internally, but sometimes an application
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListHeaderWindow.OnLeaveWindow`      Handles the ``wx.EVT_LEAVE_WINDOW`` event for :class:`UltimateListHeaderWindow`.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListHeaderWindow.OnMouse`            Handles the ``wx.EVT_MOUSE_EVENTS`` event for :class:`UltimateListHeaderWindow`.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListHeaderWindow.OnPaint`            Handles the ``wx.EVT_PAINT`` event for :class:`UltimateListHeaderWindow`.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListHeaderWindow.OnSetFocus`         Handles the ``wx.EVT_SET_FOCUS`` event for :class:`UltimateListHeaderWindow`.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListHeaderWindow.SendListEvent`      Sends a :class:`UltimateListEvent` for the parent window.
:meth:`~wx.lib.agw.ultimatelistctrl.UltimateListHeaderWindow.SetCustomRenderer`  Associate a custom renderer with the header - all columns will use it
================================================================================ ================================================================================


|


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


.. class:: UltimateListHeaderWindow(wx.Control)

   This class holds the header window for :class:`UltimateListCtrl`.

   .. method:: __init__(self, win, id, owner, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0, validator=wx.DefaultValidator, name="UltimateListCtrlcolumntitles", isFooter=False)

      Default class constructor.
      
      :param `parent`: parent window. Must not be ``None``;
      :param `id`: window identifier. A value of -1 indicates a default value;
      :param `owner`: an instance of :class:`UltimateListCtrl`;
      :param `pos`: the control position. A value of (-1, -1) indicates a default position,
       chosen by either the windowing system or wxPython, depending on platform;
      :param `size`: the control size. A value of (-1, -1) indicates a default size,
       chosen by either the windowing system or wxPython, depending on platform;
      :param `style`: the window style;
      :param `validator`: the window validator;
      :param `name`: the window name;
      :param `isFooter`: ``True`` if the :class:`UltimateListHeaderWindow` is in a footer
       position, ``False`` otherwise.


   .. method:: AdjustDC(self, dc)

      Shifts the :class:`wx.DC` origin to match the position of the main window horizontal
      scrollbar: this allows us to always use logical coordinates.
      
      :param `dc`: an instance of :class:`wx.DC`.


   .. method:: DoGetBestSize(self)

      Gets the size which best suits the window: for a control, it would be the
      minimal size which doesn't truncate the control, for a panel - the same size
      as it would have after a call to `Fit()`.


   .. method:: DrawCurrent(self)

      Force the redrawing of the column window. 


   .. method:: DrawTextFormatted(self, dc, text, rect)

      Draws the item text, correctly formatted.
      
      :param `dc`: an instance of :class:`wx.DC`;
      :param `text`: the item text;
      :param `rect`: the item client rectangle.


   .. method:: GetOwner(self)

      Returns the header window owner, an instance of :class:`UltimateListCtrl`. 


   .. method:: GetTextHeight(self)

      Returns the column text height, in pixels. 


   .. method:: GetWindowHeight(self)

      Returns the :class:`UltimateListHeaderWindow` height, in pixels. 


   .. method:: HandleColumnCheck(self, column, pos)

      Handles the case in which a column contains a checkbox-like item.
      
      :param `column`: the column index;
      :param `pos`: the mouse position.


   .. method:: HitTestColumn(self, x, y)

      HitTest method for column headers.
      
      :param `x`: the mouse `x` position;
      :param `y`: the mouse `y` position.
      
      :return: The column index if any column client rectangle contains the mouse
       position, ``wx.NOT_FOUND`` otherwise.


   .. method:: IsColumnShown(self, column)

      Returns ``True`` if the input column is shown, ``False`` if it is hidden.
      
      :param `column`: an integer specifying the column index.


   .. method:: OnEnterWindow(self, event)

      Handles the ``wx.EVT_ENTER_WINDOW`` event for :class:`UltimateListHeaderWindow`.
      
      :param `event`: a :class:`MouseEvent` event to be processed.


   .. method:: OnInternalIdle(self)

      This method is normally only used internally, but sometimes an application
      may need it to implement functionality that should not be disabled by an
      application defining an `OnIdle` handler in a derived class.
      
      This method may be used to do delayed painting, for example, and most
      implementations call :meth:`wx.Window.UpdateWindowUI` in order to send update events
      to the window in idle time.


   .. method:: OnLeaveWindow(self, event)

      Handles the ``wx.EVT_LEAVE_WINDOW`` event for :class:`UltimateListHeaderWindow`.
      
      :param `event`: a :class:`MouseEvent` event to be processed.


   .. method:: OnMouse(self, event)

      Handles the ``wx.EVT_MOUSE_EVENTS`` event for :class:`UltimateListHeaderWindow`.
      
      :param `event`: a :class:`MouseEvent` event to be processed.


   .. method:: OnPaint(self, event)

      Handles the ``wx.EVT_PAINT`` event for :class:`UltimateListHeaderWindow`.
      
      :param `event`: a :class:`PaintEvent` event to be processed.


   .. method:: OnSetFocus(self, event)

      Handles the ``wx.EVT_SET_FOCUS`` event for :class:`UltimateListHeaderWindow`.
      
      :param `event`: a :class:`FocusEvent` event to be processed.


   .. method:: SendListEvent(self, eventType, pos)

      Sends a :class:`UltimateListEvent` for the parent window.
      
      :param `eventType`: the event type;
      :param `pos`: an instance of :class:`wx.Point`.


   .. method:: SetCustomRenderer(self, renderer=None)

      Associate a custom renderer with the header - all columns will use it
      
      :param `renderer`: a class able to correctly render header buttons
      
      :note: the renderer class **must** implement the methods `DrawHeaderButton`
        and `GetForegroundColor`.


