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
UltimateListCtrl
item 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
UltimateListItemAttr
structure and associate it with this item.
- 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.
Checks/unchecks a footer item.
- Parameters:
checked –
True
to check an item,False
to 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 –
True
to enable the item,False
to disable it.
- GetAlign(self)¶
Returns the alignment for the item.
See also
SetAlign
for a list of valid alignment bits.
- GetAttributes(self)¶
Returns the associated
UltimateListItemAttr
attributes.
- 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
SetAlign
for 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
SetKind
for 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
SetMask
for 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
SetState
for 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
True
if 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
True
if 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
True
if the item is shown, orFalse
if it is hidden.
- OnSetFocus(self, event)¶
Handles the
wx.EVT_SET_FOCUS
event for the window associated to an item.- Parameters:
event – a
FocusEvent
event 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_LEFT
0x0
The item is left-aligned
ULC_FORMAT_RIGHT
0x1
The item is right-aligned
ULC_FORMAT_CENTRE
0x2
The item is centre-aligned
ULC_FORMAT_CENTER
0x2
The item is center-aligned
- SetBackgroundColour(self, colBack)¶
Sets the background colour for the item.
- Parameters:
colBack – a valid
wx.Colour
object.
- 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
SetAlign
for a list of valid alignment flags.
Sets the background colour for the footer item.
- Parameters:
colBack – a valid
wx.Colour
object.
Sets the font for the footer item.
- Parameters:
font – a valid
wx.Font
object.
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
SetKind
for 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.Colour
object.
- SetHyperText(self, hyper=True)¶
Sets whether the item is hypertext or not.
- Parameters:
hyper –
True
to set hypertext behaviour,False
otherwise.
- 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_STATE
0x1
GetState
is validULC_MASK_TEXT
0x2
GetText
is validULC_MASK_IMAGE
0x4
GetImage
is validULC_MASK_DATA
0x8
GetData
is validULC_MASK_WIDTH
0x20
GetWidth
is validULC_MASK_FORMAT
0x40
GetFormat
is validULC_MASK_FONTCOLOUR
0x80
GetTextColour
is validULC_MASK_FONT
0x100
GetFont
is validULC_MASK_BACKCOLOUR
0x200
GetBackgroundColour
is validULC_MASK_KIND
0x400
GetKind
is validULC_MASK_ENABLE
0x800
IsEnabled
is validULC_MASK_CHECK
0x1000
IsChecked
is validULC_MASK_HYPERTEXT
0x2000
IsHyperText
is validULC_MASK_WINDOW
0x4000
GetWindow
is validULC_MASK_PYDATA
0x8000
GetPyData
is validULC_MASK_SHOWN
0x10000
IsShown
is validULC_MASK_RENDERER
0x20000
GetCustomRenderer
is validULC_MASK_OVERFLOW
0x40000
GetOverFlow
is validULC_MASK_FOOTER_TEXT
0x80000
GetFooterText
is validULC_MASK_FOOTER_IMAGE
0x100000
GetFooterImage
is validULC_MASK_FOOTER_FORMAT
0x200000
GetFooterFormat
is validULC_MASK_FOOTER_FONT
0x400000
GetFooterFont
is validULC_MASK_FOOTER_CHECK
0x800000
IsFooterChecked
is validULC_MASK_FOOTER_KIND
0x1000000
GetFooterKind
is 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 –
True
to set the item in a overflow state,False
otherwise.
- 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 –
True
to show the item,False
to 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_DONTCARE
0x0
Don’t care what the state is
ULC_STATE_DROPHILITED
0x1
The item is highlighted to receive a drop event
ULC_STATE_FOCUSED
0x2
The item has the focus
ULC_STATE_SELECTED
0x4
The item is selected
ULC_STATE_CUT
0x8
The item is in the cut state
ULC_STATE_DISABLED
0x10
The item is disabled
ULC_STATE_FILTERED
0x20
The item has been filtered
ULC_STATE_INUSE
0x40
The item is in use
ULC_STATE_PICKED
0x80
The item has been picked
ULC_STATE_SOURCE
0x100
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
SetState
for 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.Colour
object.
- 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 –
True
to set a hypertext item as visited,False
otherwise.
- 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 –
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.