Move(OldIndex: Integer; NewIndex: Integer);
OldIndex - index of position of the control to be moved.
NewIndex - index of the position, to which the control is to be moved.
The Move method moves the control from the position with the OldIndex index to the position with the NewIndex index.
The following example assumes that there is the Rep object with the IPrxReport type.
Sub UserProc;
Var
Rep : IPrxReport;
Ctrls : IPrxControls;
Sheet : IPrxSheet;
Begin
//order of controls for Sheet1
Sheet := Rep.Sheets.Item(0);
Ctrls := Rep.Controls.SheetControls(Sheet);
Ctrls.Move(1,0); //second element to first position
End Sub UserProc;
After executing the example order of controls is changed for the first sheet of the report.
See also: