IMetabaseTreeCombo.Root

Syntax

Root: IMetabaseObjectDescriptor;

Description

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

Comments

By default the property is set to Null, in such conditions nothing is displayed in this component.

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

Example

Executing the example requires a form with the Button1 button and the MetabaseTreeCombo component named MetabaseTreeCombo1. Platform connections settings include a description of the Test repository. "Test" password and username 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);

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

See also:

IMetabaseTreeCombo