Arma 3 Scripting

Command in GUI Control - Tree View

tvAdd

Also available as Markdown and JSON, or read the original wiki page.

Description

Adds an item with given text to Tree View control. The position on Tree View where to add the item and the actual path to this item once added are different. If item is added to existing item, then parent item path is used. If no parent exists, empty array [] is used. See Tree View Path for more information.

Syntax

Syntax 1

tvAdd [idc, pathParent, text]

Parameters:

Returns: Number - index of the added item relative to the branch it was added to

Syntax 2

control tvAdd [pathParent, text]

Parameters:

Returns: Number - index of the added item relative to the branch it was added to

Examples

Example 1

_index = _ctrl tvAdd [[], "Parent Item"];

Example 2

_index = tvAdd [101, [0], "First item"];

See also

tvClear · tvCollapse · tvCount · tvCurSel · tvData · tvDelete · tvExpand · tvPicture · tvSetCurSel · tvSetData · tvSetValue · tvSort · tvSortByValue · tvValue · tvText · tvSetText · tvSetPicture · tvSetPictureColor · tvSetPictureRight · tvSetPictureRightColor