IPrxControls.FindByKey

Syntax

FindByKey(Key: Integer): IPrxControl;

Parameters

Key - key of a control.

Description

The FindByKey method searches for and returns an object containing a control. A control key is passed using the Key parameter.

Example

Sub Main;

Var

MB: IMetabase;

Report: IPrxReport;

Contrls: IPrxControls;

Contrl: IPrxControl;

s: String;

Begin

MB := MetabaseClass.Active;

Report := MB.ItemById("Report").Bind As IPrxReport;

Contrls := Report.Sheets.Item(0).Controls;

Contrl := Contrls.FindByKey(5);

s := Contrl.Id;

End Sub Main;

After executing the example the "s" variable contains identifier of the control, which key is equal to 5. The identifier of the regular report - Report.

See also:

IPrxControls