pyface.tree.tree_model module¶
Model for tree views.
- class pyface.tree.tree_model.TreeModel[source]¶
Bases:
HasTraits
Model for tree views.
- has_children(node)[source]¶
Returns True if a node has children, otherwise False.
This method is provided in case the model has an efficient way to determine whether or not a node has any children without having to actually get the children themselves.
- get_drag_value(node)[source]¶
Get the value that is dragged for a node.
By default the drag value is the node itself.
- get_image(node, selected, expanded)[source]¶
Returns the label image for a node.
Return None (the default) if no image is required.
- get_selection_value(node)[source]¶
Get the value that is used when a node is selected.
By default the selection value is the node itself.
- get_text(node)[source]¶
Returns the label text for a node.
Return None if no text is required. By default we return ‘str(node)’.