AGW Logo

agw_title UltimateListHeaderWindow

This class holds the header window for UltimateListCtrl.

hierarchy Inheritance Diagram

Inheritance diagram for: UltimateListHeaderWindow

Inheritance diagram of UltimateListHeaderWindow


method_summary Methods Summary

__init__Default class constructor.
AdjustDCShifts the wx.DC origin to match the position of the main window horizontal
DoGetBestSizeGets the size which best suits the window: for a control, it would be the
DrawCurrentForce the redrawing of the column window.
DrawTextFormattedDraws the item text, correctly formatted.
GetOwnerReturns the header window owner, an instance of UltimateListCtrl.
GetTextHeightReturns the column text height, in pixels.
GetWindowHeightReturns the UltimateListHeaderWindow height, in pixels.
HandleColumnCheckHandles the case in which a column contains a checkbox-like item.
HitTestColumnHitTest method for column headers.
IsColumnShownReturns True if the input column is shown, False if it is hidden.
OnEnterWindowHandles the wx.EVT_ENTER_WINDOW event for UltimateListHeaderWindow.
OnInternalIdleThis method is normally only used internally, but sometimes an application
OnLeaveWindowHandles the wx.EVT_LEAVE_WINDOW event for UltimateListHeaderWindow.
OnMouseHandles the wx.EVT_MOUSE_EVENTS event for UltimateListHeaderWindow.
OnPaintHandles the wx.EVT_PAINT event for UltimateListHeaderWindow.
OnSetFocusHandles the wx.EVT_SET_FOCUS event for UltimateListHeaderWindow.
SendListEventSends a UltimateListEvent for the parent window.
SetCustomRendererAssociate a custom renderer with the header - all columns will use it :param renderer: a class able to correctly render header buttons ..

API Class API

class UltimateListHeaderWindow(wx.PyControl)[source]

This class holds the header window for UltimateListCtrl.



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

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(dc)[source]

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()[source]

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()[source]

Force the redrawing of the column window.



DrawTextFormatted(dc, text, rect)[source]

Draws the item text, correctly formatted.

Parameters:
  • dc – an instance of wx.DC;

  • text – the item text;
  • rect – the item client rectangle.


GetOwner()[source]

Returns the header window owner, an instance of UltimateListCtrl.



GetTextHeight()[source]

Returns the column text height, in pixels.



GetWindowHeight()[source]

Returns the UltimateListHeaderWindow height, in pixels.



HandleColumnCheck(column, pos)[source]

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

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


HitTestColumn(x, y)[source]

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(column)[source]

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

Parameters:column – an integer specifying the column index.


OnEnterWindow(event)[source]

Handles the wx.EVT_ENTER_WINDOW event for UltimateListHeaderWindow.

Parameters:event – a wx.MouseEvent event to be processed.


OnInternalIdle()[source]

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(event)[source]

Handles the wx.EVT_LEAVE_WINDOW event for UltimateListHeaderWindow.

Parameters:event – a wx.MouseEvent event to be processed.



OnMouse(event)[source]

Handles the wx.EVT_MOUSE_EVENTS event for UltimateListHeaderWindow.

Parameters:event – a wx.MouseEvent event to be processed.



OnPaint(event)[source]

Handles the wx.EVT_PAINT event for UltimateListHeaderWindow.

Parameters:event – a wx.PaintEvent event to be processed.


OnSetFocus(event)[source]

Handles the wx.EVT_SET_FOCUS event for UltimateListHeaderWindow.

Parameters:event – a wx.FocusEvent event to be processed.


SendListEvent(eventType, pos)[source]

Sends a UltimateListEvent for the parent window.

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


SetCustomRenderer(renderer=None)[source]

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.

Tree

Table Of Contents

Previous topic

UltimateListHeaderData

Next topic

UltimateListItem