The Rectangle object is normally used for display purposes only. The where or size property is used to define the coordinates of the rectangle.
You can set the filled property to indicate that you want the object filled with the foreground color. You can set the foreground color using the color property. (The background color is ignored). The pensize property changes the thickness of the lines.
Note: Remember that the default scale is in character units. See the scale property for details.
See also the Draw method which allows you to draw geometric shapes on your windows and controls.
’DEMO_Rectangle;DEMO [1] © Sample function demonstrating use of the Rectangle object [2] DEMO„'Œ' ŒNEW 'Window' ª DEMO.scale„1 [3] DEMO.title„'Rectangle Example' [4] © [5] DEMO.RECT.New 'Rectangle' [6] DEMO.RECT.where„4 4 3 6 [7] DEMO.RECT.color„255 [8] © [9] DEMO.FILLEDRECT.New 'Rectangle' [10] DEMO.FILLEDRECT.where„4 12 3 6 [11] DEMO.FILLEDRECT.color„(255×256) [12] DEMO.FILLEDRECT.filled„1 [13] © [14] © Wait for the user to close the window [15] 0 0½ŒWE DEMO ’
align anchors aquaadjust autodraw children class color data dragsource droptarget enabled events extent filled maxsize methods minsize name opened pensize pointer properties scale self size sourceformats targetformats tie units visible where
Click Clienttoscreen Close Create Delete Hide New Open Paint Resize Screentoclient Send Set Show Trigger
onClick onClose onDblClick onDestroy onDragDrop onDragEnd onDragEnter onDragLeave onDragOver onDragStart onHide onMouseDown onMouseMove onMouseUp onOpen onSend onShow