wx.lib.agw.ultimatelistctrl.UltimateListLineData¶
A simple class which holds line geometries for UltimateListCtrl
.
Class Hierarchy¶
Methods Summary¶
Default class constructor. |
|
Calculates the line size and item positions. |
|
Checks/unchecks an item. |
|
Draws the line on the specified device context. |
|
Gradient fill from colour 1 to colour 2 from left to right. |
|
Draws the line on the specified device context when the parent |
|
Draws the item text, correctly formatted. |
|
Gradient fill from colour 1 to colour 2 from top to bottom. |
|
Draws the selected item(s) with the Windows Vista style. |
|
Returns an instance of |
|
Returns the line height, in pixels. |
|
Returns a Python list with the zero-based indexes of the images associated |
|
Returns information about the item. |
|
Returns the item kind. |
|
Returns the current highlighting mode. |
|
Returns the item text at the position index. |
|
Returns the item tooltip at the position index. |
|
Returns the line width. |
|
Returns the line x position. |
|
Returns the line y position. |
|
Returns |
|
Returns |
|
Returns |
|
If the input item has a window associated with it, hide it. |
|
Sets the current line as highlighted or not highlighted. |
|
Initializes the list of items. |
|
Returns |
|
Returns whether the item is checked or not. |
|
Returns |
|
Returns |
|
Resets the line dimensions (client rectangle). |
|
Reverses the line highlighting, switching it off if it was on and vice-versa. |
|
Sets an instance of |
|
Sets various attributes to the input device context. |
|
Sets the text colour for the item. |
|
Sets the line height. |
|
Sets the zero-based indexes of the images associated with the item into the |
|
Sets information about the item. |
|
Sets the item kind. |
|
Sets the line position. |
|
Sets whether |
|
Sets the item text at the position index. |
|
Sets the item tooltip at the position index. |
|
Sets the line width. |
|
Sets the line x position. |
|
Sets the line y position. |
Class API¶
- class UltimateListLineData(object)¶
A simple class which holds line geometries for
UltimateListCtrl
.
Methods¶
- __init__(self, owner)¶
Default class constructor.
- Parameters:
owner – an instance of
UltimateListCtrl
.
- CalculateSize(self, dc, spacing)¶
Calculates the line size and item positions.
- Parameters:
dc – an instance of
wx.DC
;spacing – the spacing between the items, in pixels.
- Check(self, index, checked=True)¶
Checks/unchecks an item.
- Parameters:
index – the index of the item;
checked –
True
to check an item,False
to uncheck it.
Note
This method is meaningful only for check and radio items.
- Draw(self, line, dc)¶
Draws the line on the specified device context.
- Parameters:
line – an instance of
UltimateListLineData
;dc – an instance of
wx.DC
.
- DrawHorizontalGradient(self, dc, rect, hasfocus)¶
Gradient fill from colour 1 to colour 2 from left to right.
- Parameters:
dc – an instance of
wx.DC
;rect – the rectangle to be filled with the gradient shading;
hasfocus –
True
if the mainUltimateListCtrl
has focus,False
otherwise.
- DrawInReportMode(self, dc, line, rect, rectHL, highlighted, current, enabled, oldPN, oldBR)¶
Draws the line on the specified device context when the parent
UltimateListCtrl
is in report mode.- Parameters:
dc – an instance of
wx.DC
;line – an instance of
UltimateListLineData
;rect – the item client rectangle;
rectHL – the item client rectangle when the item is highlighted;
highlighted –
True
if the item is highlighted,False
otherwise;current –
True
if the item is the current item;enabled –
True
if the item is enabled,False
otherwise;oldPN – an instance of
wx.Pen
, to save and restore at the end of the drawing;oldBR – an instance of
wx.Brush
, to save and restore at the end of the drawing.
- DrawTextFormatted(self, dc, text, row, col, itemRect, overflow)¶
Draws the item text, correctly formatted.
- Parameters:
dc – an instance of
wx.DC
;text – the item text;
row – the line number to which this item belongs to;
col – the column number to which this item belongs to;
itemRect – the item client rectangle;
overflow –
True
if the item should overflow into neighboring columns,False
otherwise.
- DrawVerticalGradient(self, dc, rect, hasfocus)¶
Gradient fill from colour 1 to colour 2 from top to bottom.
- Parameters:
dc – an instance of
wx.DC
;rect – the rectangle to be filled with the gradient shading;
hasfocus –
True
if the mainUltimateListCtrl
has focus,False
otherwise.
- DrawVistaRectangle(self, dc, rect, hasfocus)¶
Draws the selected item(s) with the Windows Vista style.
- Parameters:
dc – an instance of
wx.DC
;rect – the rectangle to be filled with the gradient shading;
hasfocus –
True
if the mainUltimateListCtrl
has focus,False
otherwise.
- GetAttr(self)¶
Returns an instance of
UltimateListItemAttr
associated with the first item in the line.
- GetHeight(self)¶
Returns the line height, in pixels.
- GetImage(self, index=0)¶
Returns a Python list with the zero-based indexes of the images associated with the item into the image list.
- Parameters:
index – the index of the item.
- GetItem(self, index, info)¶
Returns information about the item.
- Parameters:
index – the index of the item;
info – an instance of
UltimateListItem
.
- GetKind(self, index=0)¶
Returns the item kind.
- Parameters:
index – the index of the item.
See also
SetKind
for a list of valid item kinds.
- GetMode(self)¶
Returns the current highlighting mode.
- GetText(self, index)¶
Returns the item text at the position index.
- Parameters:
index – the index of the item.
- GetToolTip(self, index)¶
Returns the item tooltip at the position index.
- Parameters:
index – the index of the item.
- GetWidth(self)¶
Returns the line width.
- GetX(self)¶
Returns the line x position.
- GetY(self)¶
Returns the line y position.
- HasImage(self, col=0)¶
Returns
True
if the first item in the line has at least one image associated with it.
- HasMode(self, mode)¶
Returns
True
if the parentUltimateListCtrl
has the window style specified by mode.- Parameters:
mode – the window style to check.
- HasText(self)¶
Returns
True
if the text of first item in the line is not the empty string.
- HideItemWindow(self, item)¶
If the input item has a window associated with it, hide it.
- Parameters:
item – an instance of
UltimateListItem
.
- Highlight(self, on)¶
Sets the current line as highlighted or not highlighted.
- Parameters:
on –
True
to set the current line as highlighted,False
otherwise.
- InitItems(self, num)¶
Initializes the list of items.
- Parameters:
num – the initial number of items to store.
- InReportView(self)¶
Returns
True
if the parentUltimateListCtrl
is in report view.
- IsChecked(self, index)¶
Returns whether the item is checked or not.
- Parameters:
index – the index of the item.
- IsHighlighted(self)¶
Returns
True
if the line is highlighted.
- IsVirtual(self)¶
Returns
True
if the parentUltimateListCtrl
has theULC_VIRTUAL
style set.
- ResetDimensions(self)¶
Resets the line dimensions (client rectangle).
- ReverseHighlight(self)¶
Reverses the line highlighting, switching it off if it was on and vice-versa.
- SetAttr(self, attr)¶
Sets an instance of
UltimateListItemAttr
to the first item in the line.- Parameters:
attr – an instance of
UltimateListItemAttr
.
- SetAttributes(self, dc, attr, highlighted)¶
Sets various attributes to the input device context.
- Parameters:
dc – an instance of
wx.DC
;attr – an instance of
UltimateListItemAttr
;highlighted –
True
if the item is highlighted,False
otherwise.
- SetColour(self, index, c)¶
Sets the text colour for the item.
- Parameters:
index – the index of the item;
c – an instance of
wx.Colour
.
- SetHeight(self, height)¶
Sets the line height.
- Parameters:
height – the new line height.
- SetImage(self, index, image)¶
Sets the zero-based indexes of the images associated with the item into the image list.
- Parameters:
index – the index of the item;
image – a Python list with the zero-based indexes of the images associated with the item into the image list.
- SetItem(self, index, info)¶
Sets information about the item.
- Parameters:
index – the index of the item;
info – an instance of
UltimateListItem
.
- SetKind(self, index, kind=0)¶
Sets the item kind.
- Parameters:
index – the index of the item;
kind – may be one of the following integers:
Item Kind
Description
0
A normal item
1
A checkbox-like item
2
A radiobutton-type item
- SetPosition(self, x, y, spacing)¶
Sets the line position.
- Parameters:
x – the current x coordinate;
y – the current y coordinate;
spacing – the spacing between items, in pixels.
- SetReportView(self, inReportView)¶
Sets whether
UltimateListLineData
is in report view or not.- Parameters:
inReportView –
True
to setUltimateListLineData
in report view,False
otherwise.
- SetText(self, index, s)¶
Sets the item text at the position index.
- Parameters:
index – the index of the item;
s – the new item text.
- SetToolTip(self, index, s)¶
Sets the item tooltip at the position index.
- Parameters:
index – the index of the item;
s – the new item tooltip.
- SetWidth(self, width)¶
Sets the line width.
- Parameters:
width – the new line width.
- SetX(self, x)¶
Sets the line x position.
- Parameters:
x – the new line x position.
- SetY(self, y)¶
Sets the line y position.
- Parameters:
y – the new line y position.