IMetabaseTreeCombo.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 by default, nothing is displayed in this component.

When this property is changed, 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. 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);

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