[Overview][Constants][Types][Classes][Procedures and functions][Index] | Reference for unit 'ComCtrls' (#lcl)

# TTreeNodes.AddChild

Adds a tree node with the specified text as a child of the specified parent node.

## Declaration

Source position: comctrls.pp line 3250

`public function TTreeNodes.AddChild(`
`ParentNode: TTreeNode;`
`const S: string`
`):TTreeNode;`

## Arguments

`ParentNode` |  | Parent node for the new node.
`S` |  | Text for the new tree node.

## Function result

TTreeNode instance created in the method.

## See also

TTreeNodes.AddChildObject |  | Adds a child node with specified text and data to the parent node and returns the new node.