IMetabaseObjectParamsBox.Object

Syntax

Object: IMetabaseObject;

Description

The Object property determines the repository object, which parameters are worked with in the component.

Comments

The object specified in this property must be opened in the edit mode. After changing the parameters list in the component, to save the changes call the Save method.

If the Object property is determined in the objects inspector, the object automatically opens in the edit mode on form launch.

Example

Executing this example requires a form that contains two buttons named Button1 and Button2, and the MetabaseObjectParamsBox component named MetabaseObjectParamsBox1. The repository must also contain an object with the Report_1 identifier.

Class TESTForm: Form
    MetabaseObjectParamsBox1: MetabaseObjectParamsBox;
    Button1: Button;
    Button2: Button;

    Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
    Var
        MB: IMetabase;
    Begin
        MB := MetabaseClass.Active;
        MetabaseObjectParamsBox1.Object := MB.ItemById("Report_1").Edit;
    End Sub Button1OnClick;

    Sub Button2OnClick(Sender: Object; Args: IMouseEventArgs);
    Begin
        MetabaseObjectParamsBox1.Object.Save;
    End Sub Button2OnClick;

End Class TESTForm;

On clicking Button1 the specified object is connected to the MetabaseObjectParamsBox component. After editing the parameter and clicking Button2, all parameters changes are saved.

See also:

IMetabaseObjectParamsBox