AGW Logo

agw_title UltimateListItem

This class stores information about a UltimateListCtrl item or column.

hierarchy Inheritance Diagram

Inheritance diagram for: UltimateListItem

Inheritance diagram of UltimateListItem


method_summary Methods Summary

__init__Default class constructor.
AttributesReturns the associated attributes if they exist, or create a new UltimateListItemAttr
CheckChecks/unchecks an item.
CheckFooterChecks/unchecks a footer item.
ClearResets the item state to the default.
ClearAttributesDeletes the item attributes if they have been stored.
DeleteWindowDeletes the window associated to the item (if any).
EnableEnables or disables the item.
GetAlignReturns the alignment for the item.
GetAttributesReturns the associated UltimateListItemAttr attributes.
GetBackgroundColourReturns the background colour.
GetColumnReturns the zero-based column.
GetCustomRendererReturns the custom renderer associated with this item (if any).
GetDataReturns client data associated with the control.
GetFontReturns the item font.
GetFooterAlignReturns the alignment for the footer item.
GetFooterBackgroundColourReturns the footer item background colour.
GetFooterFontReturns the footer item font.
GetFooterFormatReturns the footer item format.
GetFooterImageReturns the zero-based index of the image associated with the footer item into
GetFooterKindReturns the footer item kind.
GetFooterTextReturns the footer text.
GetFooterTextColourReturns the footer item text colour.
GetFormatReturns the header item format.
GetIdReturns the zero-based item position.
GetImageReturns a Python list with the zero-based indexes of the images associated
GetKindReturns the item kind.
GetMaskReturns a bit mask indicating which fields of the structure are valid.
GetOverFlowReturns if the item is in the overflow state.
GetPyDataReturns data for the item, which can be any Python object.
GetStateReturns a bit field representing the state of the item.
GetTextReturns the label/header text.
GetTextColourReturns the text colour.
GetToolTipReturns the label/header tooltip.
GetVisitedReturns whether an hypertext item was visited or not.
GetWidthReturns the column width.
GetWindowReturns the window associated to the item.
GetWindowEnabledReturns whether the associated window is enabled or not.
GetWindowSizeReturns the associated window size.
HasAttributesReturns True if the item has attributes associated with it.
InitInitializes an empty UltimateListItem.
IsCheckedReturns whether the item is checked or not.
IsEnabledReturns True if the item is enabled.
IsFooterCheckedReturns whether the footer item is checked or not.
IsHyperTextReturns whether the item is hypetext or not.
IsShownReturns True if the item is shown, or False if it is hidden.
OnSetFocusHandles the wx.EVT_SET_FOCUS event for the window associated to an item.
SetAlignSets the alignment for the item.
SetBackgroundColourSets the background colour for the item.
SetColumnSets the zero-based column.
SetCustomRendererAssociate a custom renderer to this item.
SetDataSets client data for the item.
SetFontSets the font for the item.
SetFooterAlignSets the alignment for the footer item.
SetFooterBackgroundColourSets the background colour for the footer item.
SetFooterFontSets the font for the footer item.
SetFooterFormatSets the footer item format.
SetFooterImageSets the zero-based index of the image associated with the footer item into the image list.
SetFooterKindSets the footer item kind.
SetFooterTextSets the text label for the footer item.
SetFooterTextColourSets the text colour for the footer item.
SetHyperTextSets whether the item is hypertext or not.
SetIdSets the zero-based item position.
SetImageSets the zero-based indexes of the images associated with the item into the image list.
SetKindSets the item kind.
SetMaskSets the mask of valid fields.
SetOverFlowSets the item in the overflow/non overflow state.
SetPyDataSets data for the item, which can be any Python object.
SetShownSets an item as shown/hidden.
SetStateSets the item state flags.
SetStateMaskSets the bitmask that is used to determine which of the state flags are to be set.
SetTextSets the text label for the item.
SetTextColourSets the text colour for the item.
SetToolTipSets the tooltip text for the item.
SetVisitedSets whether an hypertext item was visited or not.
SetWidthSets the column width.
SetWindowSets the window associated to the item.
SetWindowEnabledSets whether the associated window is enabled or not.

API Class API

class UltimateListItem(wx.Object)[source]

This class stores information about a UltimateListCtrl item or column.



__init__(item=None)[source]

Default class constructor.

Parameters:item – if not None, another instance of UltimateListItem.


Attributes()[source]

Returns the associated attributes if they exist, or create a new UltimateListItemAttr structure and associate it with this item.



Check(checked=True)[source]

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(checked=True)[source]

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()[source]

Resets the item state to the default.



ClearAttributes()[source]

Deletes the item attributes if they have been stored.



DeleteWindow()[source]

Deletes the window associated to the item (if any).



Enable(enable=True)[source]

Enables or disables the item.

Parameters:enableTrue to enable the item, False to disable it.


GetAlign()[source]

Returns the alignment for the item.

See also

SetAlign for a list of valid alignment bits.



GetAttributes()[source]

Returns the associated UltimateListItemAttr attributes.



GetBackgroundColour()[source]

Returns the background colour.



GetColumn()[source]

Returns the zero-based column.

Note

This method is meaningful only in report mode.



GetCustomRenderer()[source]

Returns the custom renderer associated with this item (if any).



GetData()[source]

Returns client data associated with the control.

Note

Please note that client data is associated with the item and not with subitems.



GetFont()[source]

Returns the item font.



GetFooterAlign()[source]

Returns the alignment for the footer item.

See also

SetAlign for a list of valid alignment flags.



GetFooterBackgroundColour()[source]

Returns the footer item background colour.



GetFooterFont()[source]

Returns the footer item font.



GetFooterFormat()[source]

Returns the footer item format.



GetFooterImage()[source]

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



GetFooterKind()[source]

Returns the footer item kind.

See also

SetKind for a list of valid items kind.



GetFooterText()[source]

Returns the footer text.



GetFooterTextColour()[source]

Returns the footer item text colour.



GetFormat()[source]

Returns the header item format.



GetId()[source]

Returns the zero-based item position.



GetImage()[source]

Returns a Python list with the zero-based indexes of the images associated with the item into the image list.



GetKind()[source]

Returns the item kind.

See also

SetKind for a valid list of item’s kind.



GetMask()[source]

Returns a bit mask indicating which fields of the structure are valid.

See also

SetMask for a list of valid bit masks.



GetOverFlow()[source]

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()[source]

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()[source]

Returns a bit field representing the state of the item.

See also

SetState for a list of valid item states.



GetText()[source]

Returns the label/header text.



GetTextColour()[source]

Returns the text colour.



GetToolTip()[source]

Returns the label/header tooltip.



GetVisited()[source]

Returns whether an hypertext item was visited or not.



GetWidth()[source]

Returns the column width.

Note

This method is meaningful only for column headers in report mode.



GetWindow()[source]

Returns the window associated to the item.



GetWindowEnabled()[source]

Returns whether the associated window is enabled or not.



GetWindowSize()[source]

Returns the associated window size.



HasAttributes()[source]

Returns True if the item has attributes associated with it.



Init()[source]

Initializes an empty UltimateListItem.



IsChecked()[source]

Returns whether the item is checked or not.



IsEnabled()[source]

Returns True if the item is enabled.



IsFooterChecked()[source]

Returns whether the footer item is checked or not.



IsHyperText()[source]

Returns whether the item is hypetext or not.



IsShown()[source]

Returns True if the item is shown, or False if it is hidden.



OnSetFocus(event)[source]

Handles the wx.EVT_SET_FOCUS event for the window associated to an item.

Parameters:event – a wx.FocusEvent event to be processed.


SetAlign(align)[source]

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(colBack)[source]

Sets the background colour for the item.

Parameters:colBack – a valid wx.Colour object.


SetColumn(col)[source]

Sets the zero-based column.

Parameters:col – the zero-based column.

Note

This method is neaningful only in report mode.



SetCustomRenderer(renderer)[source]

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(data)[source]

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(font)[source]

Sets the font for the item.

Parameters:font – a valid wx.Font object.


SetFooterAlign(align)[source]

Sets the alignment for the footer item.

See also

SetAlign for a list of valid alignment flags.



SetFooterBackgroundColour(colBack)[source]

Sets the background colour for the footer item.

Parameters:colBack – a valid wx.Colour object.



SetFooterFont(font)[source]

Sets the font for the footer item.

Parameters:font – a valid wx.Font object.



SetFooterFormat(format)[source]

Sets the footer item format.

Parameters:format – the footer item format.


SetFooterImage(image)[source]

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(kind)[source]

Sets the footer item kind.

See also

SetKind for a list of valid items kind.



SetFooterText(text)[source]

Sets the text label for the footer item.

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


SetFooterTextColour(colText)[source]

Sets the text colour for the footer item.

Parameters:colText – a valid wx.Colour object.



SetHyperText(hyper=True)[source]

Sets whether the item is hypertext or not.

Parameters:hyperTrue to set hypertext behaviour, False otherwise.


SetId(id)[source]

Sets the zero-based item position.

Parameters:id – the zero-based item position.


SetImage(image)[source]

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(kind)[source]

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(mask)[source]

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(over=True)[source]

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(pyData)[source]

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(shown=True)[source]

Sets an item as shown/hidden.

Parameters:shownTrue to show the item, False to hide it.


SetState(state)[source]

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(stateMask)[source]

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(text)[source]

Sets the text label for the item.

Parameters:text – the text label for the item.


SetTextColour(colText)[source]

Sets the text colour for the item.

Parameters:colText – a valid wx.Colour object.



SetToolTip(text)[source]

Sets the tooltip text for the item.

Parameters:text – the tooltip text for the item.


SetVisited(visited=True)[source]

Sets whether an hypertext item was visited or not.

Parameters:visitedTrue to set a hypertext item as visited, False otherwise.


SetWidth(width)[source]

Sets the column width.

Parameters:width – the column width.

Note

This method is meaningful only for column headers in report mode.



SetWindow(wnd, expand=False)[source]

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(enable=True)[source]

Sets whether the associated window is enabled or not.

Parameters:enableTrue to enable the associated window, False to disable it.
Tree

Table Of Contents

Previous topic

UltimateListHeaderWindow

Next topic

UltimateListItemAttr