IPrxControls.IndexOf

Syntax

IndexOf(Value: IPrxControl): Integer;

Parameters

Value: A control.

Description

The IndexOf method returns index of the control passed by the Value parameter.

Example

The following example assumes that there is the Rep object with the IPrxReport type.

Sub UserProc;

Var

Rep : IPrxReport;

Ctrls : IPrxControls;

Ctrl : IPrxControl;

Sheet : IPrxSheet;

index : Integer;

Begin

Sheet := Rep.Sheets.Item(1);

Ctrls := Rep.Controls.SheetControls(Sheet);

Ctrl := Ctrls.FindById("ITEM1");

Index := Ctrls.IndexOf(Ctrl);

Ctrls.Move(Index,0);

End Sub UserProc;

After executing the example the control of the second sheet is transferred.

See also:

IPrxControls