|
Tree
|
Home
Documentation
Screenshots
Binary distributions
Source distribution
subclass of Class
Tree is not a widget type. It is a class whose objects can
be associated with a canvas widget. When a Tree instance is
associated with a canvas, it will draw a tree on this canvas.
Tree options
A tree object supports the following options in its configure method
- -canvas
- name of canvas to draw the chart
- -tag
- unique tag for all canvas items of the chart
- -padx
- size of indentation
- -pady
- size left open between different lines
- -font
- default font for the text lines
- -padtext
- size between text parts
- -startx
- x location of root
- -starty
- y location of root
- -rootimage
- optional image displayed on root
- -roottext
- optional text displayed on root
Tree specific methods
-
pathname destroy
-
-
pathname configure ?option? ?value? ?option value ...?
-
changes the way the tree is displayed. Supported options are given above.
-
pathname addnode parent node args
-
add a node to node $parent. The following arguments can be given:
- -text
- -image
- -window
- -length
- -type
- -pos
-
pathname closenode node
-
-
pathname opennode node
-
-
pathname clearnode node
-
-
pathname deletenode node
-
-
pathname exists node
-
-
pathname type node
-
-
pathname node ...
-
- pathname node index
- pathname node x y
-
pathname what ...
-
- pathname what index
- pathname what x y
-
pathname parentnode node
-
-
pathname children node
-
-
pathname selection ?option? ...
-
- pathname selection
- pathname selection clear
- pathname selection add node ?node ...?
- pathname selection set node ?node ...?
- pathname selection remove node ?node ...?
-
pathname nodes parent
-
returns the child nodes from $parent