Sub OnIsFolderElem(Sender: Object; Args: IMetabaseTreeNodeSpecialEventArgs);
Begin
//set of operators;
End Sub OnIsFolderElem;
Sender. The parameter that returns the component that generated the event.
Args. The parameter that enables the user to determine event parameters.
The OnIsFolderElem event is used to set whether elements displayed in the component tree are set as folders.
The event occurs when a tree is built for each element displayed in the tree.
The Node property of event argument can be used to get the current element, for which the event is generated. If the Special property of the event argument is set to True, the Node current element is set as a folder, and a child element tree is built. The OnIsFolderElem event is also generated for each child element.
The event can be used to set the ability of viewing contents of various band objects.
NOTE. It is necessary to consider value of the ShowInternalObjects property as some child objects stored in band objects are internal objects and by default are not displayed.
Executing the example requires a form and the MetabaseTreeList component located on it. The component is set to display data of a repository folder. This procedure is set as the OnIsFolderElem event handler for the component.
Sub MetabaseTreeList1OnIsFolderElem(Sender: Object; Args: IMetabaseTreeNodeSpecialEventArgs);
Begin
If Args.Node.ObjectDescriptor.ClassId = MetabaseObjectClass.KE_CLASS_MODELSPACE Then
Args.Special := True;
End If;
End Sub MetabaseTreeList1OnIsFolderElem;
After the form is started, modeling containers in the component element tree are presented as folders allowing to view child objects.
See also: