GetSelectedNodes: Array;
The GetSelectedNodes method returns an array of the elements that are selected in the component.
Each element of the obtained array will contain parameters of the selected tree element described by the IMetaAttributesTreeListNode interface.
Executing the example requires a form with the Button1 button, the MetaAttributesBreadcrumb component, and the MetaAttributesTreeList component named MetaAttributesTreeList1. These components are configured to work with any time series database.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
SelNodes: Array;
MembersSet: IMetaMembersSet;
Member: IMetaMember;
Begin
SelNodes := MetaAttributesTreeList1.GetSelectedNodes;
MembersSet := MetaAttributesTreeList1.GetNodesMembers(SelNodes);
MembersSet.Reset;
While Not MembersSet.Eof Do
Member := MembersSet.Current;
Debug.WriteLine(Member.Name);
MembersSet.Next;
End While;
End Sub Button1OnClick;
On clicking the button the development environment console displays names of the elements selected in the MetaAttributesTreeList component.
See also: