Inherits from
- HasTraits: enthought.traits.has_traits.HasTraits
Attributes
- allows_children
Does this item allow children?
allows_children = Bool(True)
- children
The item's children.
children = List(Instance('TreeItem'))
- data
Arbitrary data associated with the item.
data = Any
- has_children
Does the item have any children?
has_children = Property(Bool)
- parent
The item's parent.
parent = Instance('TreeItem')
Method summary
- __str__(self)
- append(self, child)
- insert(self, index, child)
- insert_after(self, after, child)
- insert_before(self, before, child)
- remove(self, child)
Methods
- __str__(self)
Returns the informal string representation of the object.
- append(self, child)
Appends a child to this item.
This removes the child from its current parent (if it has one).
- insert(self, index, child)
Inserts a child into this item at the specified index.
This removes the child from its current parent (if it has one).
- insert_after(self, after, child)
Inserts a child into this item after the specified item.
This removes the child from its current parent (if it has one).
- insert_before(self, before, child)
Inserts a child into this item before the specified item.
This removes the child from its current parent (if it has one).
- remove(self, child)
Removes a child from this item.