TreeView – AddChildren Function

Adds one or more items immediately following a specified item. The first of the new items will be a child of the specified item.

  trObj ’Do 'AddChildren' parentinx labels depth imageinx

where the arguments are:

parentinxinteger scalar, the index of the tree item that will be the parent of these new item(s).
A negative value sets the index relative to the last item in the control, so
'Do 'AddChildren' ¯1 labels
adds the new items as children of the last item in the tree.
labelsvector of text vectors, the label for each new item.
depthoptional non-negative integer vector, the depth of each item relative to the first of these new items. If supplied, the first value in depth can be zero but must not be greater than any other value in the vector. The values in depth should comply with the depth vector conventions for a tree.
imageinxoptional non-negative integer vector, the image index in the ImageList of the control for each of the new items.

The shy result is an integer scalar, the index number of the first of these new children in the amended tree.



Continue to: TreeView – AddItems Function
© Copyright Causeway Graphical Systems Ltd 2003