OnObjectMoving(Sender: Object; Agrs: IReportObjectMovingEventArgs);
Sender. The parameter that returns the component that generated the event.
Args. The parameter that enables the user to determine event parameters.
The OnObjectMoving event occurs on object moving.
It occurs before the ReportBox.OnBeforeObjectChange event.
Executing the example requires a form containing the ReportBox component named ReportBox1 and the UiReport component named UiReport1 which is a data source for ReportBox1. Set the OperationMode property of the UiReport1 component to Edit, set the Active property to True. UiReport1 must contain loaded regular report with shapes on active sheet.
The specified procedure must be assigned as the handler for the OnObjectMoving event for the ReportBox1 component.
Add a link to the Drawing system assembly for Fore.
Sub ReportBox1OnObjectMoving(Sender: object; Args: IReportObjectMovingEventArgs);
Begin
Debug.WriteLine("Object: " + Args.Object.Id +
" is moved with coordinates: " + Args.Rect.Left.ToString +
", operation is canceled: " + Args.Cancel.ToString);
End Sub ReportBox1OnObjectMoving;
After executing the example on object moving the console window displays the message that contains object identifier, report and list names, place and specified side, where the operation was executed, left side coordinate, and it determines whether moving is canceled.
See also: