wx.lib.agw.ultimatelistctrl.UltimateListItemData¶
A simple class which holds information about UltimateListItem
visual
attributes (client rectangles, positions, etc…).
Class Hierarchy¶
Methods Summary¶
Default class constructor |
|
Checks/unchecks an item. |
|
Deletes the window associated to the item (if any). |
|
Enables or disables the item. |
|
Returns the item attributes. |
|
Returns the currently set background colour. |
|
Returns the currently set text colour. |
|
Returns the custom renderer associated with this item (if any). |
|
Returns the currently set font. |
|
Returns the item 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 if the item is in the overflow state. |
|
Returns the item text. |
|
Returns the item text or a simple string if the item text is the |
|
Returns the item tooltip. |
|
Returns whether an hypertext item was visited or not. |
|
Returns the item width, in pixels. |
|
Returns the window associated to the item. |
|
Returns whether the associated window is enabled or not. |
|
Returns the associated window size. |
|
Returns the item x position. |
|
Returns the item y position. |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Returns |
|
Initializes the item data structure. |
|
Returns whether the item is checked or not. |
|
Returns |
|
Returns |
|
Returns whether the item is hypetext or not. |
|
Sets the item attributes. |
|
Sets the background colour for the item. |
|
Sets the text colour for the item. |
|
Associate a custom renderer to this item. |
|
Sets client data for the item. |
|
Sets the text font for the item. |
|
Sets whether the item is hypertext or not. |
|
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 item in the overflow/non overflow state. |
|
Sets the item position. |
|
Sets the item size. |
|
Sets the text label for the item. |
|
Sets the tooltip for the item |
|
Sets whether an hypertext item was visited or not. |
|
Sets the window associated to the item. |
|
Sets whether the associated window is enabled or not. |
Class API¶
- class UltimateListItemData(object)¶
A simple class which holds information about
UltimateListItem
visual attributes (client rectangles, positions, etc…).
Methods¶
- __init__(self, owner)¶
Default class constructor
- Parameters:
owner – an instance of
UltimateListCtrl
.
- Check(self, checked=True)¶
Checks/unchecks an item.
- Parameters:
checked –
True
to check an item,False
to uncheck it.
Note
This method is meaningful only for check and radio items.
- DeleteWindow(self)¶
Deletes the window associated to the item (if any).
- Enable(self, enable=True)¶
Enables or disables the item.
- Parameters:
enable –
True
to enable the item,False
to disable it.
- GetAttr(self)¶
Returns the item attributes.
- GetBackgroundColour(self)¶
Returns the currently set background colour.
- GetColour(self)¶
Returns the currently set text colour.
- GetCustomRenderer(self)¶
Returns the custom renderer associated with this item (if any).
- GetFont(self)¶
Returns the currently set font.
- GetHeight(self)¶
Returns the item height, in pixels.
- GetImage(self)¶
Returns a Python list with the zero-based indexes of the images associated with the item into the image list.
- GetItem(self, info)¶
Returns information about the item.
- Parameters:
info – an instance of
UltimateListItemData
.
- GetOverFlow(self)¶
Returns if the item is in the overflow state.
An item/subitem may overwrite neighboring items/subitems if its text would not normally fit in the space allotted to it.
- GetText(self)¶
Returns the item text.
- GetTextForMeasuring(self)¶
Returns the item text or a simple string if the item text is the empty string.
- GetToolTip(self)¶
Returns the item tooltip.
- GetVisited(self)¶
Returns whether an hypertext item was visited or not.
- GetWidth(self)¶
Returns the item width, in pixels.
- GetWindow(self)¶
Returns the window associated to the item.
- GetWindowEnabled(self)¶
Returns whether the associated window is enabled or not.
- GetWindowSize(self)¶
Returns the associated window size.
- GetX(self)¶
Returns the item x position.
- GetY(self)¶
Returns the item y position.
- HasBackgroundColour(self)¶
Returns
True
if the currently set background colour is valid.
- HasColour(self)¶
Returns
True
if the currently set text colour is valid.
- HasFont(self)¶
Returns
True
if the currently set font is valid.
- HasImage(self)¶
Returns
True
if the item has at least one image associated with it.
- HasText(self)¶
Returns
True
if the item text is not the empty string.
- Init(self)¶
Initializes the item data structure.
- IsChecked(self)¶
Returns whether the item is checked or not.
- IsEnabled(self)¶
Returns
True
if the item is enabled,False
if it is disabled.
- IsHit(self, x, y)¶
Returns
True
if the input position is inside the item client rectangle.- Parameters:
x – the x mouse position;
y – the y mouse position.
- IsHyperText(self)¶
Returns whether the item is hypetext or not.
- SetAttr(self, attr)¶
Sets the item attributes.
- Parameters:
attr – an instance of
UltimateListItemAttr
.
- SetBackgroundColour(self, colour)¶
Sets the background colour for the item.
- Parameters:
colour – an instance of
wx.Colour
.
- SetColour(self, colour)¶
Sets the text colour for the item.
- Parameters:
colour – an instance of
wx.Colour
.
- SetCustomRenderer(self, renderer)¶
Associate a custom renderer to this item.
- Parameters:
renderer – a class able to correctly render the item.
Note
the renderer class must implement the methods DrawSubItem, GetLineHeight and GetSubItemWidth.
- SetData(self, data)¶
Sets client data for the item.
- Parameters:
data – the client data associated to the item.
Note
Please note that client data is associated with the item and not with subitems.
- SetHyperText(self, hyper=True)¶
Sets whether the item is hypertext or not.
- Parameters:
hyper –
True
to set hypertext behaviour,False
otherwise.
- SetImage(self, image)¶
Sets the zero-based indexes of the images associated with the item into the image list.
- Parameters:
image – a Python list with the zero-based indexes of the images associated with the item into the image list.
- SetItem(self, info)¶
Sets information about the item.
- Parameters:
info – an instance of
UltimateListItemData
.
- SetKind(self, kind)¶
Sets the item kind.
- Parameters:
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
- SetOverFlow(self, over=True)¶
Sets the item in the overflow/non overflow state.
An item/subitem may overwrite neighboring items/subitems if its text would not normally fit in the space allotted to it.
- Parameters:
over –
True
to set the item in a overflow state,False
otherwise.
- SetPosition(self, x, y)¶
Sets the item position.
- Parameters:
x – the item x position;
y – the item y position.
- SetSize(self, width, height)¶
Sets the item size.
- Parameters:
width – the item width, in pixels;
height – the item height, in pixels.
- SetText(self, text)¶
Sets the text label for the item.
- Parameters:
text – the text label for the item.
- SetToolTip(self, tooltip)¶
Sets the tooltip for the item
- Parameters:
tooltip – the tooltip text
- SetVisited(self, visited=True)¶
Sets whether an hypertext item was visited or not.
- Parameters:
visited –
True
to set a hypertext item as visited,False
otherwise.
- SetWindow(self, wnd, expand=False)¶
Sets the window associated to the item.
- Parameters:
wnd – a non-toplevel window to be displayed next to the item;
expand –
True
to expand the column where the item/subitem lives, so that the window will be fully visible.
- SetWindowEnabled(self, enable=True)¶
Sets whether the associated window is enabled or not.
- Parameters:
enable –
True
to enable the associated window,False
to disable it.