Phoenix Logo

phoenix_title wx.lib.agw.ultimatelistctrl.UltimateListItemData

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


class_hierarchy Class Hierarchy

Inheritance diagram for class UltimateListItemData:


method_summary Methods Summary

__init__ Default class constructor
Check Checks/unchecks an item.
DeleteWindow Deletes the window associated to the item (if any).
Enable Enables or disables the item.
GetAttr Returns the item attributes.
GetBackgroundColour Returns the currently set background colour.
GetColour Returns the currently set text colour.
GetCustomRenderer Returns the custom renderer associated with this item (if any).
GetFont Returns the currently set font.
GetHeight Returns the item height, in pixels.
GetImage Returns a Python list with the zero-based indexes of the images associated
GetItem Returns information about the item.
GetKind Returns the item kind.
GetOverFlow Returns if the item is in the overflow state.
GetText Returns the item text.
GetTextForMeasuring Returns the item text or a simple string if the item text is the
GetToolTip Returns the item tooltip.
GetVisited Returns whether an hypertext item was visited or not.
GetWidth Returns the item width, in pixels.
GetWindow Returns the window associated to the item.
GetWindowEnabled Returns whether the associated window is enabled or not.
GetWindowSize Returns the associated window size.
GetX Returns the item x position.
GetY Returns the item y position.
HasBackgroundColour Returns True if the currently set background colour is valid.
HasColour Returns True if the currently set text colour is valid.
HasFont Returns True if the currently set font is valid.
HasImage Returns True if the item has at least one image associated with it.
HasText Returns True if the item text is not the empty string.
Init Initializes the item data structure.
IsChecked Returns whether the item is checked or not.
IsEnabled Returns True if the item is enabled, False if it is disabled.
IsHit Returns True if the input position is inside the item client rectangle.
IsHyperText Returns whether the item is hypetext or not.
SetAttr Sets the item attributes.
SetBackgroundColour Sets the background colour for the item.
SetColour Sets the text colour for the item.
SetCustomRenderer Associate a custom renderer to this item.
SetData Sets client data for the item.
SetFont Sets the text font for the item.
SetHyperText Sets whether the item is hypertext or not.
SetImage Sets the zero-based indexes of the images associated with the item into the
SetItem Sets information about the item.
SetKind Sets the item kind.
SetOverFlow Sets the item in the overflow/non overflow state.
SetPosition Sets the item position.
SetSize Sets the item size.
SetText Sets the text label for the item.
SetToolTip Sets the tooltip for the item
SetVisited Sets whether an hypertext item was visited or not.
SetWindow Sets the window associated to the item.
SetWindowEnabled Sets whether the associated window is enabled or not.

api Class API



class UltimateListItemData(object)

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


Methods



__init__(self, owner)

Default class constructor

Parameters:owner – an instance of UltimateListCtrl.


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.



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.


GetAttr(self)

Returns the item attributes.



GetBackgroundColour(self)

Returns the currently set background colour.



GetColour(self)

Returns the currently set text colour.



GetCustomRenderer(self)

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



GetFont(self)

Returns the currently set font.



GetHeight(self)

Returns the item height, in pixels.



GetImage(self)

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



GetItem(self, info)

Returns information about the item.

Parameters:info – an instance of UltimateListItemData.


GetKind(self)

Returns the item kind.

See also

SetKind for a list of valid item kinds.



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.



GetText(self)

Returns the item text.



GetTextForMeasuring(self)

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



GetToolTip(self)

Returns the item tooltip.



GetVisited(self)

Returns whether an hypertext item was visited or not.



GetWidth(self)

Returns the item width, in pixels.



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.



GetX(self)

Returns the item x position.



GetY(self)

Returns the item y position.



HasBackgroundColour(self)

Returns True if the currently set background colour is valid.



HasColour(self)

Returns True if the currently set text colour is valid.



HasFont(self)

Returns True if the currently set font is valid.



HasImage(self)

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



HasText(self)

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



Init(self)

Initializes the item data structure.



IsChecked(self)

Returns whether the item is checked or not.



IsEnabled(self)

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



IsHit(self, x, y)

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

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


IsHyperText(self)

Returns whether the item is hypetext or not.



SetAttr(self, attr)

Sets the item attributes.

Parameters:attr – an instance of UltimateListItemAttr.


SetBackgroundColour(self, colour)

Sets the background colour for the item.

Parameters:colour – an instance of wx.Colour.


SetColour(self, colour)

Sets the text colour for the item.

Parameters:colour – an instance of wx.Colour.


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

Parameters:font – an instance of wx.Font.


SetHyperText(self, hyper=True)

Sets whether the item is hypertext or not.

Parameters:hyperTrue to set hypertext behaviour, False otherwise.


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.


SetItem(self, info)

Sets information about the item.

Parameters:info – an instance of UltimateListItemData.


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


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.


SetPosition(self, x, y)

Sets the item position.

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


SetSize(self, width, height)

Sets the item size.

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


SetText(self, text)

Sets the text label for the item.

Parameters:text – the text label for the item.


SetToolTip(self, tooltip)

Sets the tooltip for the item

Parameters:tooltip – the tooltip text


SetVisited(self, visited=True)

Sets whether an hypertext item was visited or not.

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


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.