Adding child and sibling nodes
TreePad window layout
Before we continue, note the layout of TreePad's main window which is summarized in the diagram here.
Adding (inserting) a child node
After selecting the Root node in Tree1.tpd, press the Insert key and a new child node will be created. As described previously, press F2 to open the node title editor and rename it from (new node) to A.
(In this manual the term inserting will be used in preference to adding for creating a new node, since often we will not just be appending a node to the end of the tree, but actually dividing the tree in order to insert a new node between the two ends.)
Let's add another child node to the Root node, this time named B. Since TreePad obligingly moved the focus from Root node to A as soon as you created it, assuming you wanted to continue editing A, we need to move the focus back to the Root node by simply clicking it.
Press Insert again to create another new child node and rename it B. Note that it is inserted below A on the subtree.
Deleting a node
If you make a mistake and wish to delete a node, simply press the Delete key. You will be asked to confirm the deletion before it is made. If the node has any child nodes, they too will be deleted. Remember that you cannot delete the Root node. See Deleting a node.
Inserting a sibling node
To add more child nodes, we could repeat the process, but as the subtree lengthens we find ourselves dragging the mouse cursor further each time to return to the Root node. It is simpler just to add another sibling node (a node at the same level or generation) when we need one.
With the focus on B, press Enter to create a new sibling node and rename it C. What could be easier!
- TreePad does not allow you to create a sibling node to the Root node, only child nodes. Attempting to do so will generate an error message.
- TreePad does not mind if two nodes are given the same title (caption), since each node has an ID which is unique. Naturally, you should be sparing in your use of duplicate titles to avoid confusion, but they do have their uses, e.g., when using a node as a template. This will be dealt with more fully later.
Let's continue adding more Sublevels of nodes.