IModelBox.Model

Syntax

Model: IUiModel;

Description

The Model property determines the UiModel component that is used as a data source.

Example

Executing the example requires that repository contains:

Add links to the Metabase, Ms, Ui system assemblies.

The example is a handler of the OnClick event for the Button1 button.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    MB: IMetabase;
Begin
    MB := MetabaseClass.Active;
    UiModel1.Active := False;
    UiModel1.Model := MB.ItemByIdNamespace("Model_1", MB.ItemById("KONT_MODEL").Key).Bind As IMsModel;
    ModelBox1.Model := UiModel1;
    UiModel1.Active := True;
End Sub Button1OnClick;

After executing the example the Model_1 model will be loaded to the UiModel1 component on the button click. This model parameters are displayed in the ModelBox1 component.

See also:

IModelBox