IDimSelection.ChildrenCount

Syntax

ChildrenCount(Element: Integer; Recursive: Boolean): Integer;

Parameters

Element. Index of dictionary element.

Recursive. Parameter that determines whether the count includes child elements at all lower levels. If True is sent as value, all child elements at all levels are included. If the parameter value is False, only direct child elements positioned one level below the Element element are counted.

Description

The ChildrenCount method returns the number of child elements included into selection for the Element element.

Example

Executing the example requires a form, a button named Button1 positioned on this form, the UiDimension component named UiDimension1, and some visual components that use UiDimension1 as their data source. A repository dictionary is linked to UiDimension1.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Sel: IDimSelection;
Begin
    Sel := UiDimension1.Selection;
    Debug.WriteLine(Sel.ChildrenCount(Sel.Element(0), True));
End Sub Button1OnClick;

After executing the example on clicking the button the development environment console shows the total number of selected child elements for the first element included into selection.

See also:

IDimSelection