MetabaseTreeList.OnIsBrowseableElem

Syntax

Sub OnIsBrowseableElem(Sender: Object; Args: IMetabaseTreeNodeSpecialEventArgs);

Begin

//set of operators;

End Sub OnIsBrowseableElem;

Parameters

Sender. The parameter that returns the component that has generated the event.

Args. The parameter that determines event parameters.

Description

The OnIsBrowseableElem event is used to set whether an element is displayed in a tree.

Comments

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 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.

Example

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 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:

MetabaseTreeList