TTreeNodes.AddNode function
Adds or inserts a tree node as a sibling to a specified relative node.
Declaration
function AddNode(Node: TTreeNode; Relative: TTreeNode; const S: string;
Ptr: Pointer; Method: TNodeAttachMode): TTreeNodeArguments
Node | Node added or inserted to the node tree for the relative node. |
Relative | Tree node where the node will become a sibling. |
S | Accessibility value for the tree node. |
Ptr | Pointer to the accessibility data for the tree node. |
Method | Method used to store the node: add or insert. |
Function result
Tree node with an updated Parent node after the operation.
Description
Method determines where the tree node is stored in relation to the Relative node, and may be overridden (changed to naAdd or naInsert) if a parent or sibling node cannot be determined for the operation.
AddNode calls the InternalAddObject method to create the new node used as the return value.
Errors
Raises an ETreeNodeError exception if the Relative node has not been assigned and Method is not naAdd or naAddFirst.
See also
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
