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:
idc: NumberpathParent: Tree View Path - parent item or [] if no parent existstext: String
Returns: Number - index of the added item relative to the branch it was added to
Syntax 2
control tvAdd [pathParent, text]
Parameters:
control: ControlpathParent: Tree View Path - parent item or [] if no parent existstext: String
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