Rect.Top
From Xojo Documentation
Property (As Double )
aRect.Top = newDoubleValue
or
DoubleValue = aRect.Top
New in 2019r2
Supported for all project types and targets.
or
DoubleValue = aRect.Top
New in 2019r2
Supported for all project types and targets.
The top edge of the rect on the Y axis.
Sample Code
This example is in the Paint event. It computes the top of a rect that represents the union of two rects.
Var i, j As Integer
// To demonstrate the Union feature, we'll draw a Cyan rectangle
// around both the draggable rects.
Var u As Rect = rectone.Union(recttwo)
buffer.Graphics.DrawingColor = CyanColor
buffer.Graphics.DrawRectangle(u.Left, u.Top, u.Width, u.Height)
theSize = u.Size
Var theTop As Point = u.Top
i = theTop.x
j = theTop.y
// To demonstrate the Union feature, we'll draw a Cyan rectangle
// around both the draggable rects.
Var u As Rect = rectone.Union(recttwo)
buffer.Graphics.DrawingColor = CyanColor
buffer.Graphics.DrawRectangle(u.Left, u.Top, u.Width, u.Height)
theSize = u.Size
Var theTop As Point = u.Top
i = theTop.x
j = theTop.y