Overview
TeeTree provides multiple ways to add nodes to your tree structure. You can add root nodes, child nodes, and sibling (brother) nodes using simple method calls.Adding Root Nodes
The simplest way to add a node is using theAdd method without a parent:
AddRoot method explicitly:
Adding Child Nodes
There are several ways to add child nodes to an existing parent:Method 1: Using AddChild
Method 2: Using Add with Parent Parameter
Method 3: Using Shapes.AddChild
Adding Sibling Nodes
To add a node at the same level as an existing node:Chaining Node Creation
You can create multiple levels of nodes in a single statement:Adding Nodes at Specific Positions
You can specify X and Y coordinates when adding nodes:Complete Example
Here’s a complete example showing various ways to add nodes:Interactive Example: Add Buttons
Create an interactive form that allows users to add nodes dynamically:Key Points
- Use
AddorAddRootfor root nodes without parents - Use
AddChildto add child nodes to a parent - Use
AddBrotherto add sibling nodes at the same level - Chain method calls to create multiple levels efficiently
- Set
Expanded := Trueto show newly added children - Preserve node references when you need to manipulate them later
