IMetabaseTreeList.Root

Syntax

Root: IMetabaseObjectDescriptor;

Description

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

Comments

The property is set to Null, nothing is displayed in the component.

On changing value of this property, value of the Metabase property is set automatically.

Example

Executing the example requires a form with the Button1 button and the MetabaseTreeList component named MetabaseTreeList1. Platform connections settings include a description of the Test repository. The "Test" password and user name are used to connect to this repository.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);

Var

MB: IMetabase;

MAN: IMetabaseManager;

Def: IMetabaseDefinition;

Cre: ICredentials;

Begin

MB := MetabaseClass.Active;

MAN := MB.Definition.Manager;

Cre := MAN.Packs.Item(0).Package.CreateCredentials(AuthenticationMode.Password);

Def := MAN.Definitions.FindById("Test");

(Cre As IPasswordCredentials).UserName := "Test";

(Cre As IPasswordCredentials).Password := "Test";

MB := Def.Open(Cre);

MetabaseTreeList1.Root := MB.Root;

End Sub Button1OnClick;

After executing the example, on clicking the button the Test repository root folder is set as a root folder for the MetabaseTreeList1 component.

See also:

IMetabaseTreeList