Page tree
Skip to end of metadata
Go to start of metadata



Introduced in

Version:3.4

Description

Description:Adds a row (branch) to a tree control. If the row index specified is 0, then a top-level row is added, beneath any existing ones. If the index is higher than 0, then the newly added row becomes a sub-branch beneath the specified, existing row. If a row with the specified index does not exist yet, nothing is added.

Syntax

Syntax:control advTreeAdd [row, text]
Parameters:
  • control: Control - Tree control.
  • row: Number - Row number, where the branch should be added.
  • text: String - Text to put into column 1.
Return Value:Number - Row index of newly added branch (-1 if unsuccessful).

Alternative Syntax

Syntax:control advTreeAdd [row, columns]
Parameters:
  • control: Control - Tree control.
  • row: Number - Row number, where the branch should be added.
  • columns: Array of String - Each text element is put into the associated column.
Return Value:Number - Row index of newly added branch (-1 if unsuccessful).

Examples

Examples:
_idx = _control advTreeAdd [0, "Header line"]
_idx = _control advTreeAdd [0, ["Head1","Head2","Head2"]]
_idx = _control advTreeAdd [2, "Sub-branch of row 2"]

Additional Information

See also: advTreeSetText, advTreeRemoveRow, advTreeRemoveColumn, advTreeItemChildren
Multiplayer: 
Problems: 

Notes