This class holds the header window for UltimateListCtrl
.
Default class constructor. |
|
Shifts the |
|
Gets the size which best suits the window: for a control, it would be the |
|
Force the redrawing of the column window. |
|
Draws the item text, correctly formatted. |
|
Returns the header window owner, an instance of |
|
Returns the column text height, in pixels. |
|
Returns the |
|
Handles the case in which a column contains a checkbox-like item. |
|
HitTest method for column headers. |
|
Returns |
|
Handles the |
|
This method is normally only used internally, but sometimes an application |
|
Handles the |
|
Handles the |
|
Handles the |
|
Handles the |
|
Sends a |
|
Associate a custom renderer with the header - all columns will use it |
UltimateListHeaderWindow
(wx.Control)¶This class holds the header window for UltimateListCtrl
.
__init__
(self, win, id, owner, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0, validator=wx.DefaultValidator, name="UltimateListCtrlcolumntitles", isFooter=False)¶Default class constructor.
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;
isFooter – True
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.
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.
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.
column – the column index;
pos – the mouse position.
HitTestColumn
(self, x, y)¶HitTest method for column headers.
x – the mouse x position;
y – the mouse y position.
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.
column – an integer specifying the column index.
OnEnterWindow
(self, event)¶Handles the wx.EVT_ENTER_WINDOW
event for UltimateListHeaderWindow
.
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
.
event – a MouseEvent
event to be processed.
OnMouse
(self, event)¶Handles the wx.EVT_MOUSE_EVENTS
event for UltimateListHeaderWindow
.
event – a MouseEvent
event to be processed.
OnPaint
(self, event)¶Handles the wx.EVT_PAINT
event for UltimateListHeaderWindow
.
event – a PaintEvent
event to be processed.
OnSetFocus
(self, event)¶Handles the wx.EVT_SET_FOCUS
event for UltimateListHeaderWindow
.
event – a FocusEvent
event to be processed.
SendListEvent
(self, eventType, pos)¶Sends a UltimateListEvent
for the parent window.
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
renderer – a class able to correctly render header buttons
Note
the renderer class must implement the methods DrawHeaderButton and GetForegroundColor.