Phoenix Logo

phoenix_title wx.lib.agw.ultimatelistctrl.UltimateListItem

This class stores information about a UltimateListCtrl item or column.


class_hierarchy Class Hierarchy

Inheritance diagram for class UltimateListItem:


super_classes Known Superclasses

wx.Object


method_summary Methods Summary

__init__ Default class constructor.
Attributes Returns the associated attributes if they exist, or create a new UltimateListItemAttr
Check Checks/unchecks an item.
CheckFooter Checks/unchecks a footer item.
Clear Resets the item state to the default.
ClearAttributes Deletes the item attributes if they have been stored.
DeleteWindow Deletes the window associated to the item (if any).
Enable Enables or disables the item.
GetAlign Returns the alignment for the item.
GetAttributes Returns the associated UltimateListItemAttr attributes.
GetBackgroundColour Returns the background colour.
GetColumn Returns the zero-based column.
GetCustomRenderer Returns the custom renderer associated with this item (if any).
GetData Returns client data associated with the control.
GetFont Returns the item font.
GetFooterAlign Returns the alignment for the footer item.
GetFooterBackgroundColour Returns the footer item background colour.
GetFooterFont Returns the footer item font.
GetFooterFormat Returns the footer item format.
GetFooterImage Returns the zero-based index of the image associated with the footer item into
GetFooterKind Returns the footer item kind.
GetFooterText Returns the footer text.
GetFooterTextColour Returns the footer item text colour.
GetFormat Returns the header item format.
GetId Returns the zero-based item position.
GetImage Returns a Python list with the zero-based indexes of the images associated
GetKind Returns the item kind.
GetMask Returns a bit mask indicating which fields of the structure are valid.
GetOverFlow Returns if the item is in the overflow state.
GetPyData Returns data for the item, which can be any Python object.
GetState Returns a bit field representing the state of the item.
GetText Returns the label/header text.
GetTextColour Returns the text colour.
GetToolTip Returns the label/header tooltip.
GetVisited Returns whether an hypertext item was visited or not.
GetWidth Returns the column width.
GetWindow Returns the window associated to the item.
GetWindowEnabled Returns whether the associated window is enabled or not.
GetWindowSize Returns the associated window size.
HasAttributes Returns True if the item has attributes associated with it.
Init Initializes an empty UltimateListItem.
IsChecked Returns whether the item is checked or not.
IsEnabled Returns True if the item is enabled.
IsFooterChecked Returns whether the footer item is checked or not.
IsHyperText Returns whether the item is hypetext or not.
IsShown Returns True if the item is shown, or False if it is hidden.
OnSetFocus Handles the wx.EVT_SET_FOCUS event for the window associated to an item.
SetAlign Sets the alignment for the item.
SetBackgroundColour Sets the background colour for the item.
SetColumn Sets the zero-based column.
SetCustomRenderer Associate a custom renderer to this item.
SetData Sets client data for the item.
SetFont Sets the font for the item.
SetFooterAlign Sets the alignment for the footer item.
SetFooterBackgroundColour Sets the background colour for the footer item.
SetFooterFont Sets the font for the footer item.
SetFooterFormat Sets the footer item format.
SetFooterImage Sets the zero-based index of the image associated with the footer item into the
SetFooterKind Sets the footer item kind.
SetFooterText Sets the text label for the footer item.
SetFooterTextColour Sets the text colour for the footer item.
SetHyperText Sets whether the item is hypertext or not.
SetId Sets the zero-based item position.
SetImage Sets the zero-based indexes of the images associated with the item into the
SetKind Sets the item kind.
SetMask Sets the mask of valid fields.
SetOverFlow Sets the item in the overflow/non overflow state.
SetPyData Sets data for the item, which can be any Python object.
SetShown Sets an item as shown/hidden.
SetState Sets the item state flags.
SetStateMask Sets the bitmask that is used to determine which of the state flags are
SetText Sets the text label for the item.
SetTextColour Sets the text colour for the item.
SetToolTip Sets the tooltip text for the item.
SetVisited Sets whether an hypertext item was visited or not.
SetWidth Sets the column width.
SetWindow Sets the window associated to the item.
SetWindowEnabled Sets whether the associated window is enabled or not.

api 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 of UltimateListItem.


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:checkedTrue to check an item, False to uncheck it.

Note

This method is meaningful only for check and radio items.



CheckFooter(self, checked=True)

Checks/unchecks a footer item.

Parameters:checkedTrue 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:enableTrue 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.



GetFooterAlign(self)

Returns the alignment for the footer item.

See also

SetAlign for a list of valid alignment flags.



GetFooterBackgroundColour(self)

Returns the footer item background colour.



GetFooterFont(self)

Returns the footer item font.



GetFooterFormat(self)

Returns the footer item format.



GetFooterImage(self)

Returns the zero-based index of the image associated with the footer item into the image list.



GetFooterKind(self)

Returns the footer item kind.

See also

SetKind for a list of valid items kind.



GetFooterText(self)

Returns the footer text.



GetFooterTextColour(self)

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.



GetKind(self)

Returns the item kind.

See also

SetKind for a valid list of item’s kind.



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.



IsFooterChecked(self)

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, or False 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.



SetFont(self, font)

Sets the font for the item.

Parameters:font – a valid wx.Font object.


SetFooterAlign(self, align)

Sets the alignment for the footer item.

See also

SetAlign for a list of valid alignment flags.



SetFooterBackgroundColour(self, colBack)

Sets the background colour for the footer item.

Parameters:colBack – a valid wx.Colour object.


SetFooterFont(self, font)

Sets the font for the footer item.

Parameters:font – a valid wx.Font object.


SetFooterFormat(self, format)

Sets the footer item format.

Parameters:format – the footer item format.


SetFooterImage(self, image)

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.


SetFooterKind(self, kind)

Sets the footer item kind.

See also

SetKind for a list of valid items kind.



SetFooterText(self, text)

Sets the text label for the footer item.

Parameters:text – the text label for the footer item.


SetFooterTextColour(self, colText)

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:hyperTrue 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 valid
ULC_MASK_TEXT 0x2 GetText is valid
ULC_MASK_IMAGE 0x4 GetImage is valid
ULC_MASK_DATA 0x8 GetData is valid
ULC_MASK_WIDTH 0x20 GetWidth is valid
ULC_MASK_FORMAT 0x40 GetFormat is valid
ULC_MASK_FONTCOLOUR 0x80 GetTextColour is valid
ULC_MASK_FONT 0x100 GetFont is valid
ULC_MASK_BACKCOLOUR 0x200 GetBackgroundColour is valid
ULC_MASK_KIND 0x400 GetKind is valid
ULC_MASK_ENABLE 0x800 IsEnabled is valid
ULC_MASK_CHECK 0x1000 IsChecked is valid
ULC_MASK_HYPERTEXT 0x2000 IsHyperText is valid
ULC_MASK_WINDOW 0x4000 GetWindow is valid
ULC_MASK_PYDATA 0x8000 GetPyData is valid
ULC_MASK_SHOWN 0x10000 IsShown is valid
ULC_MASK_RENDERER 0x20000 GetCustomRenderer is valid
ULC_MASK_OVERFLOW 0x40000 GetOverFlow is valid
ULC_MASK_FOOTER_TEXT 0x80000 GetFooterText is valid
ULC_MASK_FOOTER_IMAGE 0x100000 GetFooterImage is valid
ULC_MASK_FOOTER_FORMAT 0x200000 GetFooterFormat is valid
ULC_MASK_FOOTER_FONT 0x400000 GetFooterFont is valid
ULC_MASK_FOOTER_CHECK 0x800000 IsFooterChecked is valid
ULC_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:overTrue 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:shownTrue 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



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:visitedTrue 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;
  • expandTrue 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:enableTrue to enable the associated window, False to disable it.