AGW Logo

agw_title UltimateListItemData

A simple class which holds information about UltimateListItem visual attributes (client rectangles, positions, etc...).

hierarchy Inheritance Diagram

Inheritance diagram for: UltimateListItemData

Inheritance diagram of UltimateListItemData


method_summary Methods Summary

__init__Default class constructor
CheckChecks/unchecks an item.
DeleteWindowDeletes the window associated to the item (if any).
EnableEnables or disables the item.
GetAttrReturns the item attributes.
GetBackgroundColourReturns the currently set background colour.
GetColourReturns the currently set text colour.
GetCustomRendererReturns the custom renderer associated with this item (if any).
GetFontReturns the currently set font.
GetHeightReturns the item height, in pixels.
GetImageReturns a Python list with the zero-based indexes of the images associated
GetItemReturns information about the item.
GetKindReturns the item kind.
GetOverFlowReturns if the item is in the overflow state.
GetTextReturns the item text.
GetTextForMeasuringReturns the item text or a simple string if the item text is the
GetToolTipReturns the item tooltip.
GetVisitedReturns whether an hypertext item was visited or not.
GetWidthReturns the item width, in pixels.
GetWindowReturns the window associated to the item.
GetWindowEnabledReturns whether the associated window is enabled or not.
GetWindowSizeReturns the associated window size.
GetXReturns the item x position.
GetYReturns the item y position.
HasBackgroundColourReturns True if the currently set background colour is valid.
HasColourReturns True if the currently set text colour is valid.
HasFontReturns True if the currently set font is valid.
HasImageReturns True if the item has at least one image associated with it.
HasTextReturns True if the item text is not the empty string.
InitInitializes the item data structure.
IsCheckedReturns whether the item is checked or not.
IsEnabledReturns True if the item is enabled, False if it is disabled.
IsHitReturns True if the input position is inside the item client rectangle.
IsHyperTextReturns whether the item is hypetext or not.
SetAttrSets the item attributes.
SetBackgroundColourSets the background colour for the item.
SetColourSets the text colour for the item.
SetCustomRendererAssociate a custom renderer to this item.
SetDataSets client data for the item.
SetFontSets the text font for the item.
SetHyperTextSets whether the item is hypertext or not.
SetImageSets the zero-based indexes of the images associated with the item into the image list.
SetItemSets information about the item.
SetKindSets the item kind.
SetOverFlowSets the item in the overflow/non overflow state.
SetPositionSets the item position.
SetSizeSets the item size.
SetTextSets the text label for the item.
SetToolTipSets the tooltip for the item
SetVisitedSets whether an hypertext item was visited or not.
SetWindowSets the window associated to the item.
SetWindowEnabledSets whether the associated window is enabled or not.

API Class API

class UltimateListItemData(object)[source]

A simple class which holds information about UltimateListItem visual attributes (client rectangles, positions, etc...).



__init__(owner)[source]

Default class constructor

Parameters:owner – an instance of UltimateListCtrl.


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.



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.


GetAttr()[source]

Returns the item attributes.



GetBackgroundColour()[source]

Returns the currently set background colour.



GetColour()[source]

Returns the currently set text colour.



GetCustomRenderer()[source]

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



GetFont()[source]

Returns the currently set font.



GetHeight()[source]

Returns the item height, in pixels.



GetImage()[source]

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



GetItem(info)[source]

Returns information about the item.

Parameters:info – an instance of UltimateListItemData.


GetKind()[source]

Returns the item kind.

See also

SetKind for a list of valid item kinds.



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.



GetText()[source]

Returns the item text.



GetTextForMeasuring()[source]

Returns the item text or a simple string if the item text is the empty string.



GetToolTip()[source]

Returns the item tooltip.



GetVisited()[source]

Returns whether an hypertext item was visited or not.



GetWidth()[source]

Returns the item width, in pixels.



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.



GetX()[source]

Returns the item x position.



GetY()[source]

Returns the item y position.



HasBackgroundColour()[source]

Returns True if the currently set background colour is valid.



HasColour()[source]

Returns True if the currently set text colour is valid.



HasFont()[source]

Returns True if the currently set font is valid.



HasImage()[source]

Returns True if the item has at least one image associated with it.



HasText()[source]

Returns True if the item text is not the empty string.



Init()[source]

Initializes the item data structure.



IsChecked()[source]

Returns whether the item is checked or not.



IsEnabled()[source]

Returns True if the item is enabled, False if it is disabled.



IsHit(x, y)[source]

Returns True if the input position is inside the item client rectangle.

Parameters:
  • x – the x mouse position;
  • y – the y mouse position.


IsHyperText()[source]

Returns whether the item is hypetext or not.



SetAttr(attr)[source]

Sets the item attributes.

Parameters:attr – an instance of UltimateListItemAttr.


SetBackgroundColour(colour)[source]

Sets the background colour for the item.

Parameters:colour – an instance of wx.Colour.


SetColour(colour)[source]

Sets the text colour for the item.

Parameters:colour – an instance of wx.Colour.



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 text font for the item.

Parameters:font – an instance of wx.Font.


SetHyperText(hyper=True)[source]

Sets whether the item is hypertext or not.

Parameters:hyperTrue to set hypertext behaviour, False otherwise.


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.


SetItem(info)[source]

Sets information about the item.

Parameters:info – an instance of UltimateListItemData.


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


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.


SetPosition(x, y)[source]

Sets the item position.

Parameters:
  • x – the item x position;
  • y – the item y position.


SetSize(width, height)[source]

Sets the item size.

Parameters:
  • width – the item width, in pixels;
  • height – the item height, in pixels.


SetText(text)[source]

Sets the text label for the item.

Parameters:text – the text label for the item.


SetToolTip(tooltip)[source]

Sets the tooltip for the item

Parameters:tooltip – the tooltip text


SetVisited(visited=True)[source]

Sets whether an hypertext item was visited or not.

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


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

UltimateListItemAttr

Next topic

UltimateListLineData