Sub OnIsBrowseableElem(Sender: Object; Args: IMetabaseTreeNodeSpecialEventArgs);
Begin
//set of operators;
End Sub OnIsBrowseableElem;
Sender. The parameter that returns the component that has generated the event.
Args. The parameter that determines event parameters.
The OnIsBrowseableElem event is used to set whether an element is displayed in a tree.
The event occurs when a tree is built for each element displayed in the tree, except for folders and all elements, which are set as folders in the OnIsFolderElem event.
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 event argument is set to True, the Node current element is displayed in the component tree. If the Special property is set to False, the element is hidden.
Executing the example requires a form and the MetabaseTreeCombo component located on it. The component is set to display data of a repository folder. This procedure is set as the OnIsBrowseableElem event handler for the component.
Sub MetabaseTreeCombo1OnIsBrowseableElem(Sender: Object; Args: IMetabaseTreeNodeSpecialEventArgs);
Var
s: String;
Begin
s := Args.Node.ObjectDescriptor.Name;
If s.IndexOf("temp") <> -1 Then
Args.Special := False;
End If;
End Sub MetabaseTreeCombo1OnIsBrowseableElem;
After starting the form, objects, which names contain "temp" are not displayed in the component element tree.
See also: