Sub OnBeforeDeleteControl(Sender: Object; Args: IUiPrxControlCancelEventArgs);
Begin
//set of operators;
End Sub OnBeforeDeleteControl;
Sender. The parameter that returns the component that generated the event.
Args. The parameter that enables the user to determine event parameters.
The OnBeforeDeleteControl event occurs before deleting 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.
See also: