ParamControl(ParamId: String): IControl;
ParamId is an identifier of the object parameter loaded into the UiObject component.
The ParamControl property determines the connection of parameter with control element, values of which are used when opening the object.
Executing the example requires a form with the Button1 button, the UiMetabaseObjectParams component named UiMetabaseObjectParams1, the component, which values of the parameters are controlled by UiMetabaseObjectParams1, and two IntegerEdit components that are used as control elements of the parameters values. The controlled object has two integer parameters.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
UIObj: IUiMetabaseObject;
Params: IMetabaseObjectParams;
Begin
UIObj := UiMetabaseObjectParams1.UiObject;
UiMetabaseObjectParams1.ResetParamControls;
Params := UIObj.Object.Params;
UiMetabaseObjectParams1.ParamControl(Params.Item(0).Id) := IntegerEdit1;
UiMetabaseObjectParams1.ParamControl(Params.Item(1).Id) := IntegerEdit2;
UIObj.Active := False;
UIObj.Active := True;
End Sub Button1OnClick;
If the user presses the button after executing this example, the binding for all parameters of the UiMetabaseObjectParams1 component is reset. New binding for two parameters are set and controlled object is reopened with the current values of the control elements.
See also: