OnIsBrowseableElem(Sender: Object; Args: IMetabaseTreeNodeSpecialEventArgs);
Sender. The parameter that returns the component that generated the event.
Args. The parameter that enables the user to determine 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 the elements, which are set as folders in the MetabaseTreeList.OnIsFolderElem event.
The IMetabaseTreeNodeSpecialEventArgs.Node property of event argument can be used to get the current element, for which the event has been generated. If the IMetabaseTreeNodeSpecialEventArgs.Special property of event argument is set to True, the current IMetabaseTreeNodeSpecialEventArgs.Node element will be displayed in the component tree. When the IMetabaseTreeNodeSpecialEventArgs.Special property is set to False, the element will be hidden.
Executing the example requires a form with the MetabaseTreeList component on the form. The component is set to display data of a repository folder. This procedure is set as the OnIsBrowseableElem event handler for the component.
Sub MetabaseTreeList1OnIsBrowseableElem(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 MetabaseTreeList1OnIsBrowseableElem;
After a form is started, the component element tree does not display the object, which names contain "temp".
See also: