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

Inheritance diagram for class
UltimateListHeaderWindow:
|
|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`.