Realbasic.Rect.HorizontalCenter

From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

Property (As Double )
aRealbasic.Rect.HorizontalCenter = newDoubleValue
or
DoubleValue = aRealbasic.Rect.HorizontalCenter

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.

Dim i, j As Double
i = DraggingRect.HorizontalCenter
j = DraggingRect.VerticalCenter