Phoenix Logo

phoenix_title wx.lib.agw.ultimatelistctrl.UltimateListHeaderWindow

This class holds the header window for UltimateListCtrl.


class_hierarchy Class Hierarchy

Inheritance diagram for class UltimateListHeaderWindow:

super_classes Known Superclasses

wx.Control


method_summary Methods Summary

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


Methods



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

Default class constructor.

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


AdjustDC(self, dc)

Shifts the wx.DC origin to match the position of the main window horizontal scrollbar: this allows us to always use logical coordinates.

Parameters:dc – an instance of wx.DC.


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



DrawCurrent(self)

Force the redrawing of the column window.



DrawTextFormatted(self, dc, text, rect)

Draws the item text, correctly formatted.

Parameters:
  • dc – an instance of wx.DC;
  • text – the item text;
  • rect – the item client rectangle.


GetOwner(self)

Returns the header window owner, an instance of UltimateListCtrl.



GetTextHeight(self)

Returns the column text height, in pixels.



GetWindowHeight(self)

Returns the UltimateListHeaderWindow height, in pixels.



HandleColumnCheck(self, column, pos)

Handles the case in which a column contains a checkbox-like item.

Parameters:
  • column – the column index;
  • pos – the mouse position.


HitTestColumn(self, x, y)

HitTest method for column headers.

Parameters:
  • x – the mouse x position;
  • y – the mouse y position.
Returns:

The column index if any column client rectangle contains the mouse position, wx.NOT_FOUND otherwise.



IsColumnShown(self, column)

Returns True if the input column is shown, False if it is hidden.

Parameters:column – an integer specifying the column index.


OnEnterWindow(self, event)

Handles the wx.EVT_ENTER_WINDOW event for UltimateListHeaderWindow.

Parameters:event – a MouseEvent event to be processed.


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 wx.Window.UpdateWindowUI in order to send update events to the window in idle time.



OnLeaveWindow(self, event)

Handles the wx.EVT_LEAVE_WINDOW event for UltimateListHeaderWindow.

Parameters:event – a MouseEvent event to be processed.


OnMouse(self, event)

Handles the wx.EVT_MOUSE_EVENTS event for UltimateListHeaderWindow.

Parameters:event – a MouseEvent event to be processed.


OnPaint(self, event)

Handles the wx.EVT_PAINT event for UltimateListHeaderWindow.

Parameters:event – a PaintEvent event to be processed.


OnSetFocus(self, event)

Handles the wx.EVT_SET_FOCUS event for UltimateListHeaderWindow.

Parameters:event – a FocusEvent event to be processed.


SendListEvent(self, eventType, pos)

Sends a UltimateListEvent for the parent window.

Parameters:
  • eventType – the event type;
  • pos – an instance of wx.Point.


SetCustomRenderer(self, renderer=None)

Associate a custom renderer with the header - all columns will use it

Parameters:renderer – a class able to correctly render header buttons

Note

the renderer class must implement the methods DrawHeaderButton and GetForegroundColor.