Rect.HorizontalCenter
From Xojo Documentation
Property (As Double )
aRect.HorizontalCenter = newDoubleValue
or
DoubleValue = aRect.HorizontalCenter
New in 2019r2
Supported for all project types and targets.
or
DoubleValue = aRect.HorizontalCenter
New in 2019r2
Supported for all project types and targets.
The center of the Rect on the X axis. Changing this value will move the Rect.
Sample Code
This example is in the MouseDrag event. It gets the horizontal and vertical centers of the rect being dragged.