Show contents 

Report > Report Assembly Interfaces > IPrxReportUserEvents > IPrxReportUserEvents.EventOnBeforeDeleteControl

IPrxReportUserEvents.EventOnBeforeDeleteControl

Syntax

EventOnBeforeDeleteControl(Args: IUiPrxControlCancelEventArgs);

Parameters

Args. The parameter that enables the user to work with event parameters.

Description

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

Example

Executing the example requires a regular report that contains a control. Connect a unit to the regular report, select the connected unit an the Parent class as an event handler.

Add links to the Report, Ui system assemblies.

Public Class EventsClass: Parent
    Public Sub OnBeforeDeleteControl(Control: IPrxControl; Var Cancel: Boolean);
    Begin
        //Call system event redetermined in the Parent class
        Inherited OnBeforeDeleteControl(Control, Cancel);
    End Sub OnBeforeDeleteControl;
End Class EventsClass;
Class Parent: ReportEvents
// Work with controls:
    Sub EventOnBeforeDeleteControl(Args: IUiPrxControlCancelEventArgs);
    Begin
        WinApplication.InformationBox("Control will be deleted")
    End Sub EventOnBeforeDeleteControl;
End Class Parent;

After executing the example, before control value changes, the information message is displayed in the regular report.

See also:

IPrxReportUserEvents