"children"

The attribute "children" returns the direct sub elements (1. under layer) of a tree widget.

Synopsis

dyn_string shape.children(string ID);

Parameters

Parameter Description
shape Name of the object
ID ID of the node for which the sub elements are searched.

Return Value

Result list of the IDs of the sub elements.

Description

The attribute "children" returns the direct sub elements (1. under layer) of a tree widget. The sub elements of this sub element won't be returned.

Example

Returns the number of direct sub elements (first under layer). You have to add the elements and sub elements via the function "appendItem" first. In this example the elements and sub elements are added first.

main()
{
  //Add three columns
  TREE1.addColumn("NAME");
  TREE1.addColumn("SURNAME");
  TREE1.addColumn("ADDRESS");
  TREE1.appendItem("","WHOLE_NAME","WHOLE_NAME");
  //Add the first item
  TREE1.appendItem("WHOLE_NAME","MARIA","MARIA");
  //Add the second item
  //Returns he number of direct sub elements
  dyn_string i;
  DebugN(i=TREE1.children("WHOLE_NAME"));
}

Assignment

Tree widget