.. wxPython Phoenix documentation This file was generated by Phoenix's sphinx generator and associated tools, do not edit by hand. Copyright: (c) 2011-2020 by Total Control Software License: wxWindows License .. include:: headings.inc .. currentmodule:: wx.lib.agw.ultimatelistctrl .. highlight:: python .. _wx.lib.agw.ultimatelistctrl.UltimateListItemData: ========================================================================================================================================== |phoenix_title| **wx.lib.agw.ultimatelistctrl.UltimateListItemData** ========================================================================================================================================== A simple class which holds information about :class:`UltimateListItem` visual attributes (client rectangles, positions, etc...). | |class_hierarchy| Class Hierarchy ================================= .. raw:: html
Inheritance diagram for class UltimateListItemData:
| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.__init__` Default class constructor :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.Check` Checks/unchecks an item. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.DeleteWindow` Deletes the window associated to the item (if any). :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.Enable` Enables or disables the item. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.GetAttr` Returns the item attributes. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.GetBackgroundColour` Returns the currently set background colour. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.GetColour` Returns the currently set text colour. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.GetCustomRenderer` Returns the custom renderer associated with this item (if any). :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.GetFont` Returns the currently set font. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.GetHeight` Returns the item height, in pixels. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.GetImage` Returns a Python list with the zero-based indexes of the images associated :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.GetItem` Returns information about the item. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.GetKind` Returns the item kind. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.GetOverFlow` Returns if the item is in the overflow state. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.GetText` Returns the item text. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.GetTextForMeasuring` Returns the item text or a simple string if the item text is the :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.GetToolTip` Returns the item tooltip. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.GetVisited` Returns whether an hypertext item was visited or not. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.GetWidth` Returns the item width, in pixels. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.GetWindow` Returns the window associated to the item. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.GetWindowEnabled` Returns whether the associated window is enabled or not. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.GetWindowSize` Returns the associated window size. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.GetX` Returns the item `x` position. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.GetY` Returns the item `y` position. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.HasBackgroundColour` Returns ``True`` if the currently set background colour is valid. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.HasColour` Returns ``True`` if the currently set text colour is valid. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.HasFont` Returns ``True`` if the currently set font is valid. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.HasImage` Returns ``True`` if the item has at least one image associated with it. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.HasText` Returns ``True`` if the item text is not the empty string. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.Init` Initializes the item data structure. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.IsChecked` Returns whether the item is checked or not. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.IsEnabled` Returns ``True`` if the item is enabled, ``False`` if it is disabled. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.IsHit` Returns ``True`` if the input position is inside the item client rectangle. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.IsHyperText` Returns whether the item is hypetext or not. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.SetAttr` Sets the item attributes. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.SetBackgroundColour` Sets the background colour for the item. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.SetColour` Sets the text colour for the item. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.SetCustomRenderer` Associate a custom renderer to this item. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.SetData` Sets client data for the item. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.SetFont` Sets the text font for the item. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.SetHyperText` Sets whether the item is hypertext or not. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.SetImage` Sets the zero-based indexes of the images associated with the item into the :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.SetItem` Sets information about the item. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.SetKind` Sets the item kind. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.SetOverFlow` Sets the item in the overflow/non overflow state. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.SetPosition` Sets the item position. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.SetSize` Sets the item size. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.SetText` Sets the text label for the item. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.SetToolTip` Sets the tooltip for the item :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.SetVisited` Sets whether an hypertext item was visited or not. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.SetWindow` Sets the window associated to the item. :meth:`~wx.lib.agw.ultimatelistctrl.UltimateListItemData.SetWindowEnabled` Sets whether the associated window is enabled or not. ================================================================================ ================================================================================ | |api| Class API =============== .. class:: UltimateListItemData(object) A simple class which holds information about :class:`UltimateListItem` visual attributes (client rectangles, positions, etc...). .. method:: __init__(self, owner) Default class constructor :param `owner`: an instance of :class:`UltimateListCtrl`. .. method:: Check(self, checked=True) Checks/unchecks an item. :param `checked`: ``True`` to check an item, ``False`` to uncheck it. .. note:: This method is meaningful only for check and radio items. .. method:: DeleteWindow(self) Deletes the window associated to the item (if any). .. method:: Enable(self, enable=True) Enables or disables the item. :param `enable`: ``True`` to enable the item, ``False`` to disable it. .. method:: GetAttr(self) Returns the item attributes. .. method:: GetBackgroundColour(self) Returns the currently set background colour. .. method:: GetColour(self) Returns the currently set text colour. .. method:: GetCustomRenderer(self) Returns the custom renderer associated with this item (if any). .. method:: GetFont(self) Returns the currently set font. .. method:: GetHeight(self) Returns the item height, in pixels. .. method:: GetImage(self) Returns a Python list with the zero-based indexes of the images associated with the item into the image list. .. method:: GetItem(self, info) Returns information about the item. :param `info`: an instance of :class:`UltimateListItemData`. .. method:: GetKind(self) Returns the item kind. .. seealso:: :meth:`~UltimateListItemData.SetKind` for a list of valid item kinds. .. method:: 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. .. method:: GetText(self) Returns the item text. .. method:: GetTextForMeasuring(self) Returns the item text or a simple string if the item text is the empty string. .. method:: GetToolTip(self) Returns the item tooltip. .. method:: GetVisited(self) Returns whether an hypertext item was visited or not. .. method:: GetWidth(self) Returns the item width, in pixels. .. method:: GetWindow(self) Returns the window associated to the item. .. method:: GetWindowEnabled(self) Returns whether the associated window is enabled or not. .. method:: GetWindowSize(self) Returns the associated window size. .. method:: GetX(self) Returns the item `x` position. .. method:: GetY(self) Returns the item `y` position. .. method:: HasBackgroundColour(self) Returns ``True`` if the currently set background colour is valid. .. method:: HasColour(self) Returns ``True`` if the currently set text colour is valid. .. method:: HasFont(self) Returns ``True`` if the currently set font is valid. .. method:: HasImage(self) Returns ``True`` if the item has at least one image associated with it. .. method:: HasText(self) Returns ``True`` if the item text is not the empty string. .. method:: Init(self) Initializes the item data structure. .. method:: IsChecked(self) Returns whether the item is checked or not. .. method:: IsEnabled(self) Returns ``True`` if the item is enabled, ``False`` if it is disabled. .. method:: IsHit(self, x, y) Returns ``True`` if the input position is inside the item client rectangle. :param `x`: the `x` mouse position; :param `y`: the `y` mouse position. .. method:: IsHyperText(self) Returns whether the item is hypetext or not. .. method:: SetAttr(self, attr) Sets the item attributes. :param `attr`: an instance of :class:`UltimateListItemAttr`. .. method:: SetBackgroundColour(self, colour) Sets the background colour for the item. :param `colour`: an instance of :class:`wx.Colour`. .. method:: SetColour(self, colour) Sets the text colour for the item. :param `colour`: an instance of :class:`wx.Colour`. .. method:: SetCustomRenderer(self, renderer) Associate a custom renderer to this item. :param `renderer`: a class able to correctly render the item. .. note:: the renderer class **must** implement the methods `DrawSubItem`, `GetLineHeight` and `GetSubItemWidth`. .. method:: SetData(self, data) Sets client data for the item. :param `data`: the client data associated to the item. .. note:: Please note that client data is associated with the item and not with subitems. .. method:: SetFont(self, font) Sets the text font for the item. :param `font`: an instance of :class:`wx.Font`. .. method:: SetHyperText(self, hyper=True) Sets whether the item is hypertext or not. :param `hyper`: ``True`` to set hypertext behaviour, ``False`` otherwise. .. method:: SetImage(self, image) Sets the zero-based indexes of the images associated with the item into the image list. :param `image`: a Python list with the zero-based indexes of the images associated with the item into the image list. .. method:: SetItem(self, info) Sets information about the item. :param `info`: an instance of :class:`UltimateListItemData`. .. method:: SetKind(self, kind) Sets the item kind. :param `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 =============== ========================== .. method:: 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. :param `over`: ``True`` to set the item in a overflow state, ``False`` otherwise. .. method:: SetPosition(self, x, y) Sets the item position. :param `x`: the item `x` position; :param `y`: the item `y` position. .. method:: SetSize(self, width, height) Sets the item size. :param `width`: the item width, in pixels; :param `height`: the item height, in pixels. .. method:: SetText(self, text) Sets the text label for the item. :param `text`: the text label for the item. .. method:: SetToolTip(self, tooltip) Sets the tooltip for the item :param `tooltip`: the tooltip text .. method:: SetVisited(self, visited=True) Sets whether an hypertext item was visited or not. :param `visited`: ``True`` to set a hypertext item as visited, ``False`` otherwise. .. method:: SetWindow(self, wnd, expand=False) Sets the window associated to the item. :param `wnd`: a non-toplevel window to be displayed next to the item; :param `expand`: ``True`` to expand the column where the item/subitem lives, so that the window will be fully visible. .. method:: SetWindowEnabled(self, enable=True) Sets whether the associated window is enabled or not. :param `enable`: ``True`` to enable the associated window, ``False`` to disable it.