Sub OnObjectMoving(Sender: Object; Agrs: ITabObjectMovingEventArgs);
Begin
//set of operators
End Sub OnObjectMoving;
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 TabSheetBox.OnBeforeObjectChange event.
Executing the example requires a form containing the TabSheetBox component named TabSheetBox1 and the UiReport component named UiReport1 that is a data source for TabSheetBox1. Set the Edit value in the OperationMode property of the UiReport1 component, True - in the Active property. UiReport1 must contain loaded regular report with shapes on the active list.
The specified procedure must be assigned by the OnObjectMoving event handler for the TabSheetBox1 component.
Add a link to the Drawing system assembly for Fore.
Sub TabSheetBox1OnObjectMoving(Sender: object; Args: ITabObjectMovingEventArgs);
Begin
Debug.WriteLine("Object: " + Args.Object.Id +
" is moved with coordinates: " + Args.Rect.Left.ToString);
End Sub TabSheetBox1OnObjectMoving;
End Class TabSheetBox_OnObjectMovingForm;
After executing the example, on moving the shape the console window displays a message containing object identifier and coordinate from the left side.
See also: