================== TreeItem (hwx.gui) ================== An item in a Tree. Inherits: - :ref:`Widget (hwx.gui)` ---------- Properties ---------- +-------------+-------------+-------------+ | icon_ | selectable_ | selected_ | +-------------+-------------+-------------+ | text_ | | +-------------+---------------------------+ -------------- Public Methods -------------- +--------------------------------------+ | add_ (self, text, icon=None, **kwds) | +--------------------------------------+ | clear_ (self) | +--------------------------------------+ | enableEdit_ (self, col, edit=True) | +--------------------------------------+ | ensureVisible_ (self) | +--------------------------------------+ | getChildren_ (self) | +--------------------------------------+ | remove_ (self) | +--------------------------------------+ | selectAndShow_ (self, clear=True) | +--------------------------------------+ ---------------- Property Details ---------------- .. _icon: .. property:: icon A list of icons to be displayed. .. _selectable: .. property:: selectable (bool) Determines whether the item can be selected or not. .. _selected: .. property:: selected (bool) Determines whether the item is selected or not. .. _text: .. property:: text A list of text to be displayed. -------------- Method Details -------------- .. _add: .. method:: add(self, text, icon=None, **kwds) Adds a TreeItem to the Tree. :param text: Text that gets displayed. :type text: str :param icon: Absolute path of the icon. :type icon: str :returns: The added TreeItem. :rtype: TreeItem .. _clear: .. method:: clear(self) Removes all the children from the tree. .. _enableEdit: .. method:: enableEdit(self, col, edit=True) Makes a column of a tree item editable. :param col: Column index needs to be make editable. :type col: int :param edit: If True, column is editable else not. :type edit: bool .. _ensureVisible: .. method:: ensureVisible(self) Ensures this TreeItem is visible. .. _getChildren: .. method:: getChildren(self) Overloaded Widget method for 'children' property. .. _remove: .. method:: remove(self) Removes the item from the Tree. .. _selectAndShow: .. method:: selectAndShow(self, clear=True) Selects and makes this TreeItem visible.