Sub OnBeforeDeleteControl(Sender: Object; Args: IUiPrxControlCancelEventArgs);
Begin
//set of operators;
End Sub OnBeforeDeleteControl;
Sub OnBeforeDeleteControl(Sender: System.Object; Args: Prognoz.Platform.Interop.Report.UiPrxControlCancelEventArgs);
Begin
//set of operators;
End Sub OnBeforeDeleteControl;
Sender. A parameter that returns the component that generated the event.
Args. A parameter that enables the user to determine event parameters.
The OnBeforeDeleteControl event occurs before removing a control.
On changing a regular report control value the UiReport.OnChangeControlValue event occurs.
Executing the example requires a form that contains the UiReport component with the UiReport1 identifier and a visualizer, which data source is the UiReport1 component. Specify a regular report, which active sheet contains controls, as a data source for the UiReport1 component.
The example is the OnBeforeDeleteControl event handler for the UiReport1 component.
Add a link to the Ui system assembly.
Sub UiReport1OnBeforeDeleteControl(Sender: Object; Args: IUiPrxControlCancelEventArgs);
Begin
If Not WinApplication.ConfirmationBox("Remove control?") Then
Args.Cancel := True;
End If;
End Sub UiReport1OnBeforeDeleteControl;
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.
The requirements and result of the Fore.NET example execution match with those in the Fore example. Use Fore.NET analogs instead of Fore components.
Imports Prognoz.Platform.Interop.Ui;
…
Private Sub uiReportNet1_OnBeforeDeleteControl(Sender: System.Object;
Args: Prognoz.Platform.Interop.Report.UiPrxControlCancelEventArgs);
Var
WinAppCls: WinApplicationClassClass = New WinApplicationClassClass();
Begin
If Not WinAppCls.ConfirmationBox("Remove control?", New IWin32WindowForeAdapter(Self)) Then
Args.Cancel := True;
End If;
End Sub;
See also: