GetCheckedNodes([WithIndeterminate: Boolean = False]): IDimSelection;
WithIndeterminate is an optional parameter, that determines whether the elements having a flag selection in intermediate state (CheckState=Indeterminate) are to be included in the collection. By default the elements with an intermediate state of a flag selection are not included in the collection.
The GetCheckedNodes method returns the collection of the elements, for which the flag is set.
Executing the example requires a form with the Button1 button, the DimensionTree component named DimensionTree1 and the UiDimension component, which is a data source for the DimensionTree1.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
CheckedElem: IDimSelection;
i: Integer;
Begin
CheckedElem := DimensionTree1.GetCheckedNodes(True);
i := CheckedElem.SelectedCount;
End Sub Button1OnClick;
On clicking the button the collection of the DimensionTree1 component elements having a flag selection is retrieved. The elements with an intermediate state of a flag selection are also included in the collection. The "i" variable stores the retrieved collection elements count.
See also: