IMetabaseListView.Root

Syntax

Root: IMetabaseObjectDescriptor;

Description

The Root property determines the root directory description, which contents is displayed in the component.

Comments

As a property value, specify any folder or any band object description (MDM repository, Time series database, Modeling container, Assembly). Navigation will be available by all child objects.

Example

Executing the example requires a form with the button named Button1 on it and the MetabaseListView component named MetabaseListView1. Add a link to the Metabase system assembly.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    CombineFilter: IMetabaseDialogCombiFilter;
    Filter: IMetabaseDialogMetaclassFilter;
Begin
    MetabaseListView1.Root := MetabaseClass.Active.Root;
    
//Ability to call system context menu for objects
    MetabaseListView1.EnableSystemPopupMenu := True;
    
//Display the Find All button
    MetabaseListView1.EnableFindAll := True;
    CombineFilter := 
New MetabaseDialogCombiFilter.Create;
    
//Filter to display folders
    Filter := New MetabaseDialogMetaclassFilter.Create;
    Filter.ObjectMetaclass := MetabaseObjectMetaclass.FOLDER_CLASS;
    CombineFilter.Filters.AddFilter(Filter);
    
//Filter to display various types of MDM dictionaries
    Filter := New MetabaseDialogMetaclassFilter.Create;
    Filter.ObjectMetaclass := MetabaseObjectMetaclass.RDS_CLASS;
    CombineFilter.Filters.AddFilter(Filter);
    
//Set filter for component
    MetabaseListView1.Filters.AddFilter(CombineFilter);
End Sub Button1OnClick;

Clicking the button sets up the MetabaseListView1 component. The root directory will be set for the component and the ability to call system context menu for repository objects will be enabled. The Find All button will be available in the search dialog box. The object filter will also be set: folders and various types of MDM dictionaries will be displayed in the component.

See also:

IMetabaseListView