Realbasic.Rect.Constructor(X As Integer, Y As Integer, Width As Integer, Height As Integer)
From Xojo Documentation
| This item was deprecated in version 2019r2.
Please use Rect.Constructor(X_As_Double,_Y_As_Double,_Width_As_Double,_Height_As_Double) as a replacement.
Creates a Realbasic.Rect object at X,Y and the passed width and height.
This example is from the Rects example that is covered in the Notes section of the Rect class. The Open event of the main window contains constructors that appear in the top-left and bottom-right corners of the main window.
// RectOne will be in the upper left. RectTwo will be in the lower right.
rectOne = New Realbasic.Rect(0, 0, 100, 75)
rectTwo = New Realbasic.Rect(Self.Width - 100, Self.Height - 75, 100, 75)
// Fill our point classes to avoid NilObjectException errors.
mousePosition = New Realbasic.Point(-1, -1)
mouseOffset = New Realbasic.Point(0, 0)