TreeItem (hwx.gui)¶
An item in a Tree.
- Inherits:
Properties¶
Public Methods¶
clear (self)
enableEdit (self, col, edit=True)
ensureVisible (self)
getChildren (self)
remove (self)
selectAndShow (self, clear=True)
Property Details¶
- property icon¶
A list of icons to be displayed.
- property selectable¶
(bool) Determines whether the item can be selected or not.
- property selected¶
(bool) Determines whether the item is selected or not.
- property text¶
A list of text to be displayed.
Method Details¶
- 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(self)¶
Removes all the children from the tree.
- 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(self)¶
Ensures this TreeItem is visible.
- getChildren(self)¶
Overloaded Widget method for ‘children’ property.
- remove(self)¶
Removes the item from the Tree.
- selectAndShow(self, clear=True)¶
Selects and makes this TreeItem visible.