wx.lib.agw.ultimatelistctrl.UltimateListItem¶
This class stores information about a UltimateListCtrl item or column.
Class Hierarchy¶
Known Superclasses¶
Methods Summary¶
Default class constructor. |
|
Returns the associated attributes if they exist, or create a new |
|
Checks/unchecks an item. |
|
Checks/unchecks a footer item. |
|
Resets the item state to the default. |
|
Deletes the item attributes if they have been stored. |
|
Deletes the window associated to the item (if any). |
|
Enables or disables the item. |
|
Returns the alignment for the item. |
|
Returns the associated |
|
Returns the background colour. |
|
Returns the zero-based column. |
|
Returns the custom renderer associated with this item (if any). |
|
Returns client data associated with the control. |
|
Returns the item font. |
|
Returns the alignment for the footer item. |
|
Returns the footer item background colour. |
|
Returns the footer item font. |
|
Returns the footer item format. |
|
Returns the zero-based index of the image associated with the footer item into |
|
Returns the footer item kind. |
|
Returns the footer text. |
|
Returns the footer item text colour. |
|
Returns the header item format. |
|
Returns the zero-based item position. |
|
Returns a Python list with the zero-based indexes of the images associated |
|
Returns the item kind. |
|
Returns a bit mask indicating which fields of the structure are valid. |
|
Returns if the item is in the overflow state. |
|
Returns data for the item, which can be any Python object. |
|
Returns a bit field representing the state of the item. |
|
Returns the label/header text. |
|
Returns the text colour. |
|
Returns the label/header tooltip. |
|
Returns whether an hypertext item was visited or not. |
|
Returns the column width. |
|
Returns the window associated to the item. |
|
Returns whether the associated window is enabled or not. |
|
Returns the associated window size. |
|
Returns |
|
Initializes an empty |
|
Returns whether the item is checked or not. |
|
Returns |
|
Returns whether the footer item is checked or not. |
|
Returns whether the item is hypetext or not. |
|
Returns |
|
Handles the |
|
Sets the alignment for the item. |
|
Sets the background colour for the item. |
|
Sets the zero-based column. |
|
Associate a custom renderer to this item. |
|
Sets client data for the item. |
|
Sets the font for the item. |
|
Sets the alignment for the footer item. |
|
Sets the background colour for the footer item. |
|
Sets the font for the footer item. |
|
Sets the footer item format. |
|
Sets the zero-based index of the image associated with the footer item into the |
|
Sets the footer item kind. |
|
Sets the text label for the footer item. |
|
Sets the text colour for the footer item. |
|
Sets whether the item is hypertext or not. |
|
Sets the zero-based item position. |
|
Sets the zero-based indexes of the images associated with the item into the |
|
Sets the item kind. |
|
Sets the mask of valid fields. |
|
Sets the item in the overflow/non overflow state. |
|
Sets data for the item, which can be any Python object. |
|
Sets an item as shown/hidden. |
|
Sets the item state flags. |
|
Sets the bitmask that is used to determine which of the state flags are |
|
Sets the text label for the item. |
|
Sets the text colour for the item. |
|
Sets the tooltip text for the item. |
|
Sets whether an hypertext item was visited or not. |
|
Sets the column width. |
|
Sets the window associated to the item. |
|
Sets whether the associated window is enabled or not. |
Class API¶
- class UltimateListItem(wx.Object)¶
This class stores information about a
UltimateListCtrlitem or column.
Methods¶
- __init__(self, item=None)¶
Default class constructor.
- Parameters:
item – if not
None, another instance ofUltimateListItem.
- Attributes(self)¶
Returns the associated attributes if they exist, or create a new
UltimateListItemAttrstructure and associate it with this item.
- Check(self, checked=True)¶
Checks/unchecks an item.
- Parameters:
checked –
Trueto check an item,Falseto uncheck it.
Note
This method is meaningful only for check and radio items.
Checks/unchecks a footer item.
- Parameters:
checked –
Trueto check an item,Falseto uncheck it.
Note
This method is meaningful only for check and radio footer items.
- Clear(self)¶
Resets the item state to the default.
- ClearAttributes(self)¶
Deletes the item attributes if they have been stored.
- DeleteWindow(self)¶
Deletes the window associated to the item (if any).
- Enable(self, enable=True)¶
Enables or disables the item.
- Parameters:
enable –
Trueto enable the item,Falseto disable it.
- GetAlign(self)¶
Returns the alignment for the item.
See also
SetAlignfor a list of valid alignment bits.
- GetAttributes(self)¶
Returns the associated
UltimateListItemAttrattributes.
- GetBackgroundColour(self)¶
Returns the background colour.
- GetColumn(self)¶
Returns the zero-based column.
Note
This method is meaningful only in report mode.
- GetCustomRenderer(self)¶
Returns the custom renderer associated with this item (if any).
- GetData(self)¶
Returns client data associated with the control.
Note
Please note that client data is associated with the item and not with subitems.
- GetFont(self)¶
Returns the item font.
Returns the alignment for the footer item.
See also
SetAlignfor a list of valid alignment flags.
Returns the footer item background colour.
Returns the footer item font.
Returns the footer item format.
Returns the zero-based index of the image associated with the footer item into the image list.
Returns the footer item kind.
See also
SetKindfor a list of valid items kind.
Returns the footer text.
Returns the footer item text colour.
- GetFormat(self)¶
Returns the header item format.
- GetId(self)¶
Returns the zero-based item position.
- GetImage(self)¶
Returns a Python list with the zero-based indexes of the images associated with the item into the image list.
- GetMask(self)¶
Returns a bit mask indicating which fields of the structure are valid.
See also
SetMaskfor a list of valid bit masks.
- 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.
- GetPyData(self)¶
Returns data for the item, which can be any Python object.
Note
Please note that Python data is associated with the item and not with subitems.
- GetState(self)¶
Returns a bit field representing the state of the item.
See also
SetStatefor a list of valid item states.
- GetText(self)¶
Returns the label/header text.
- GetTextColour(self)¶
Returns the text colour.
- GetToolTip(self)¶
Returns the label/header tooltip.
- GetVisited(self)¶
Returns whether an hypertext item was visited or not.
- GetWidth(self)¶
Returns the column width.
Note
This method is meaningful only for column headers in report mode.
- 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.
- HasAttributes(self)¶
Returns
Trueif the item has attributes associated with it.
- Init(self)¶
Initializes an empty
UltimateListItem.
- IsChecked(self)¶
Returns whether the item is checked or not.
- IsEnabled(self)¶
Returns
Trueif the item is enabled.
Returns whether the footer item is checked or not.
- IsHyperText(self)¶
Returns whether the item is hypetext or not.
- IsShown(self)¶
Returns
Trueif the item is shown, orFalseif it is hidden.
- OnSetFocus(self, event)¶
Handles the
wx.EVT_SET_FOCUSevent for the window associated to an item.- Parameters:
event – a
FocusEventevent to be processed.
- SetAlign(self, align)¶
Sets the alignment for the item.
- Parameters:
align – one of the following bits:
Alignment Bits
Hex Value
Description
ULC_FORMAT_LEFT0x0
The item is left-aligned
ULC_FORMAT_RIGHT0x1
The item is right-aligned
ULC_FORMAT_CENTRE0x2
The item is centre-aligned
ULC_FORMAT_CENTER0x2
The item is center-aligned
- SetBackgroundColour(self, colBack)¶
Sets the background colour for the item.
- Parameters:
colBack – a valid
wx.Colourobject.
- SetColumn(self, col)¶
Sets the zero-based column.
- Parameters:
col – the zero-based column.
Note
This method is neaningful only in report mode.
- 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.
Sets the alignment for the footer item.
See also
SetAlignfor a list of valid alignment flags.
Sets the background colour for the footer item.
- Parameters:
colBack – a valid
wx.Colourobject.
Sets the font for the footer item.
- Parameters:
font – a valid
wx.Fontobject.
Sets the footer item format.
- Parameters:
format – the footer item format.
Sets the zero-based index of the image associated with the footer item into the image list.
- Parameters:
image – the zero-based index of the image associated with the footer item into the image list.
Sets the footer item kind.
See also
SetKindfor a list of valid items kind.
Sets the text label for the footer item.
- Parameters:
text – the text label for the footer item.
Sets the text colour for the footer item.
- Parameters:
colText – a valid
wx.Colourobject.
- SetHyperText(self, hyper=True)¶
Sets whether the item is hypertext or not.
- Parameters:
hyper –
Trueto set hypertext behaviour,Falseotherwise.
- SetId(self, id)¶
Sets the zero-based item position.
- Parameters:
id – the zero-based item position.
- 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.
- 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
- SetMask(self, mask)¶
Sets the mask of valid fields.
- Parameters:
mask – any combination of the following bits:
Mask Bits
Hex Value
Description
ULC_MASK_STATE0x1
GetStateis validULC_MASK_TEXT0x2
GetTextis validULC_MASK_IMAGE0x4
GetImageis validULC_MASK_DATA0x8
GetDatais validULC_MASK_WIDTH0x20
GetWidthis validULC_MASK_FORMAT0x40
GetFormatis validULC_MASK_FONTCOLOUR0x80
GetTextColouris validULC_MASK_FONT0x100
GetFontis validULC_MASK_BACKCOLOUR0x200
GetBackgroundColouris validULC_MASK_KIND0x400
GetKindis validULC_MASK_ENABLE0x800
IsEnabledis validULC_MASK_CHECK0x1000
IsCheckedis validULC_MASK_HYPERTEXT0x2000
IsHyperTextis validULC_MASK_WINDOW0x4000
GetWindowis validULC_MASK_PYDATA0x8000
GetPyDatais validULC_MASK_SHOWN0x10000
IsShownis validULC_MASK_RENDERER0x20000
GetCustomRendereris validULC_MASK_OVERFLOW0x40000
GetOverFlowis validULC_MASK_FOOTER_TEXT0x80000
GetFooterTextis validULC_MASK_FOOTER_IMAGE0x100000
GetFooterImageis validULC_MASK_FOOTER_FORMAT0x200000
GetFooterFormatis validULC_MASK_FOOTER_FONT0x400000
GetFooterFontis validULC_MASK_FOOTER_CHECK0x800000
IsFooterCheckedis validULC_MASK_FOOTER_KIND0x1000000
GetFooterKindis valid
- 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 –
Trueto set the item in a overflow state,Falseotherwise.
- SetPyData(self, pyData)¶
Sets data for the item, which can be any Python object.
- Parameters:
data – any Python object associated to the item.
Note
Please note that Python data is associated with the item and not with subitems.
- SetShown(self, shown=True)¶
Sets an item as shown/hidden.
- Parameters:
shown –
Trueto show the item,Falseto hide it.
- SetState(self, state)¶
Sets the item state flags.
- Parameters:
state – any combination of the following bits:
State Bits
Hex Value
Description
ULC_STATE_DONTCARE0x0
Don’t care what the state is
ULC_STATE_DROPHILITED0x1
The item is highlighted to receive a drop event
ULC_STATE_FOCUSED0x2
The item has the focus
ULC_STATE_SELECTED0x4
The item is selected
ULC_STATE_CUT0x8
The item is in the cut state
ULC_STATE_DISABLED0x10
The item is disabled
ULC_STATE_FILTERED0x20
The item has been filtered
ULC_STATE_INUSE0x40
The item is in use
ULC_STATE_PICKED0x80
The item has been picked
ULC_STATE_SOURCE0x100
The item is a drag and drop source
Note
The valid state flags are influenced by the value of the state mask.
See also
- SetStateMask(self, stateMask)¶
Sets the bitmask that is used to determine which of the state flags are to be set.
- Parameters:
stateMask – the state bitmask.
See also
SetStatefor a list of valid state bits.
- SetText(self, text)¶
Sets the text label for the item.
- Parameters:
text – the text label for the item.
- SetTextColour(self, colText)¶
Sets the text colour for the item.
- Parameters:
colText – a valid
wx.Colourobject.
- SetToolTip(self, text)¶
Sets the tooltip text for the item.
- Parameters:
text – the tooltip text for the item.
- SetVisited(self, visited=True)¶
Sets whether an hypertext item was visited or not.
- Parameters:
visited –
Trueto set a hypertext item as visited,Falseotherwise.
- SetWidth(self, width)¶
Sets the column width.
- Parameters:
width – the column width.
Note
This method is meaningful only for column headers in report mode.
- 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 –
Trueto 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 –
Trueto enable the associated window,Falseto disable it.