TreeView – AddItems Function

Adds one or more items immediately following a specified item. The first of the new items will have the same depth as the specified item.

  trObj ’Do 'AddItem' peerinx labels depth imageinx

where the arguments are:

peerinxinteger scalar, the index of the tree item after which these new items will be inserted.
A negative value sets the index relative to the last item in the control, so
’Do 'AddItem' ¯1 labels
inserts the new items following the last item in the tree.
labelsvector of text vectors, the label for each new item.
depth optional 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.
imageinx optional 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 items in the amended tree.



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