ReportEvents.OnBeforeDeleteControl

Syntax

Sub OnBeforeDeleteControl(Control: IPrxControl; Var Cancel: Boolean);

Begin

//set of operators;

End Sub OnBeforeDeleteControl;

Parameters

Control. Control that generated event.

Cancel. Parameter that removes a control.

Description

The OnBeforeDeleteControl method implements the event that occurs before deleting a control.

Comments

Available values of the Cancel parameter:

To implement the event that occurs on changing value of a regular report control, use the ReportEvents.OnChangeControlValue method.

Example

The specified class is a handler of regular report events.

Add a link to the Ui system assembly.

Class EventsClass: ReportEvents
Public Sub OnBeforeDeleteControl(Control: IPrxControl; Var Cancel: Boolean);
Begin
    If Not WinApplication.ConfirmationBox("Remove control?"Then
        Cancel := True;
    End If;
End Sub OnBeforeDeleteControl;
End Class EventsClass;

Before removing a control it is prompted to confirm the executed action. If the answer is positive, the control is removed, otherwise, it is not.

See also:

ReportEvents