EventOnBeforeDeleteControl(Args: IUiPrxControlCancelEventArgs);
Args. The parameter, which enables the user to work with event parameters.
The EventOnBeforeDeleteControl method implements the event that occurs before deleting a control.
Executing the example requires a regular report that contains a control. Connect a unit to the regular report, select the connected unit an the EventsClass class as an event handler. Add links to the Report, Ui system assemblies in the unit.
Class EventsClass: ReportEvents
// Work with controls:
Sub EventOnBeforeDeleteControl(Args: IUiPrxControlCancelEventArgs);
Begin
If Not WinApplication.ConfirmationBox("Delete control?") Then
Args.Cancel := True;
End If;
End Sub EventOnBeforeDeleteControl;
End Class EventsClass;
On removing a control in the regular report it is prompted to confirm the executed action. If the answer is positive, the control is removed, otherwise, it is not.
See also: