Function Name | dcl-Tree-AddChild |
---|---|
Syntax | (dcl-Tree-AddChild
<CONTROL> (List of Lists as (ParentItem [as
Handle or
String]
Label [as
String] {Key [as
String]}
{ImageIndex [as
Integer]}
{SelectedImageIndex [as
Integer]}
{ExpandedImageIndex [as
Integer]}) ...)) |
Return Type | Handle or Boolean (T if successful; otherwise NIL) |
Applies To | Tree |
This method appends one or more new child items to the specified parent item. Label is the label text for the new child item. If Key is specified, it must be a unique (to the tree control instance) string key to be used for identifying the new child item. The three optional ImageIndex arguments are images from the control's image list that display when the item is in the normal, selected, or expanded states, respectively. The return value is the unique handle of the new item if only one child item is added; if multiple items are added in one call, the return value is T if the call was successful or NIL otherwise.
This method supports an alternative syntax when adding only a single child item. The alternative syntax does not require the arguments to be in nested lists.