IRdsParamsControlInstance.ControlState

Syntax

ControlState: DictionaryParamsControlState;

Description

The ControlState property returns a current state of an object that controls parameters values of a composite dictionary.

Example

Executing the example requires a form with the btnPState button, and an MDM repository with the NSI_1 identifier that contains an MDM dictionary with the MAINDICT identifier. The dictionary has an attribute with the PARAM_ATTR identifier that is used to control parameters of the linked dictionary. Add links to the Metabase, Rds and Forms system assemblies.

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

Sub btnPStateOnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Mb: IMetabase;
    Dict: IRdsDictionary;
    DictInst: IRdsDictionaryInstance;
    ElData: IRdsDictionaryElementData;
Begin
    Mb := MetabaseClass.Active;
    Dict := Mb.ItemByIdNamespace("MAINDICT", Mb.GetObjectKeyById("NSI_1")).Bind As IRdsDictionary;
    DictInst := Dict.Open(Null);
    ElData := DictInst.CreateElementData;
    Text := DictInst.Links.Item(0).ParamsControl(ElData).ControlState.ToString;    
End Sub btnPStateOnClick;

After executing the example, on clicking the button the form title displays the code of the current status of the object (Parameter values are defined and have not changed) that controls parameter values of the linked dictionary.

See also:

IRdsParamsControlInstance