ChildrenCount(Element: Integer; Recursive: Boolean): Integer;
ChildrenCount(Element: UInteger; Recursive: Boolean): Integer;
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.
The ChildrenCount method returns the number of child elements included into selection for the Element element.
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.
Executing the example requires a .NET form, a button named Button1 positioned on this form, the UiDimensionNet component named UiDimensionNet1, and some visual components that use UiDimensionNet1 as their data source. A repository dictionary is linked to UiDimensionNet1.
Private Sub button1_Click(sender: System.Object; e: System.EventArgs);
Var
Sel: IDimSelection;
Begin
Sel := uiDimensionNet1.Selection;
Text := Sel.ChildrenCount(Sel.Element[0], True).ToString();
End Sub;
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: