| 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 |
此方法将一个或多个新的子项目追加到指定的父项目。 Label是新子项的标签文本。 如果指定了Key,它必须是用于标识新子项的唯一(对于树控件实例)字符串键。 三个可选的ImageIndex参数是来自控件图像列表的图像,分别在项目处于正常,选定或展开状态时显示。 如果只添加一个子项,则返回值是新项的唯一句柄; 如果在一个调用中添加了多个项目,则返回值为T,否则为NIL。
此方法在仅添加单个子项目时支持替代语法。 替代语法不需要参数在嵌套列表中。