AddNode adds a new tree node with the specified text at the end of this tree and returns a pointer to the new node.
(text string)
| 99 | // AddNode adds a new tree node with the specified text |
| 100 | // at the end of this tree and returns a pointer to the new node. |
| 101 | func (t *Tree) AddNode(text string) *TreeNode { |
| 102 | |
| 103 | n := newTreeNode(text, t, nil) |
| 104 | n.update() |
| 105 | n.recalc() |
| 106 | n.litem = t.List.Add(n) |
| 107 | return n |
| 108 | } |
| 109 | |
| 110 | // Remove removes the specified child from the tree or any |
| 111 | // of its children nodes. |