IPrxReportUserEvents.EventOnBeforeDeleteControl

Syntax

EventOnBeforeDeleteControl(Args: IUiPrxControlCancelEventArgs);

Parameters

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

Description

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

Fore 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 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.

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Report;
Imports Prognoz.Platform.Interop.Ui;

Public Class EventsClass: PrxForeNetReportUserEventsClass
// Work with controls:
Public Override Sub EventOnBeforeDeleteControl(Args: Prognoz.Platform.Interop.Report.UiPrxControlCancelEventArgs);
Var
    WinAppCls: WinApplicationClass = 
New WinApplicationClassClass();
Begin
    
If Not WinAppCls.ConfirmationBox("Delete control?"NullThen
    Args.Cancel := 
True;
    
End If;
End Sub EventOnBeforeDeleteControl;
End Class EventsClass;

See also:

IPrxReportUserEvents