Rectangle

From Xojo Documentation

Class (inherits from RectControl)

Draws a rectangle.

Events
Close DropObject MouseExit
ConstructContextualMenu KeyDown MouseMove
ContextualMenuAction KeyUp MouseUp
DragEnter MouseDown MouseWheel
DragExit MouseDrag Open
DragOver MouseEnter


Properties
Active fa-lock-32.png LockBottom TabIndex
AutoDeactivate LockLeft TabStop
BorderWidth LockRight Top
BottomRightColor LockTop TopLeftColor
Enabled MouseCursor Transparent
FillColor MouseX fa-lock-32.png TrueWindow fa-lock-32.png
Handle fa-lock-32.png MouseY fa-lock-32.png Visible
Height Name Width
HelpTag PanelIndex Window fa-lock-32.png
Index fa-lock-32.png Parent
Left Scope fa-lock-32.png


Methods
AcceptFileDrop Close RefreshRect
AcceptPictureDrop DrawInto SetFocus
AcceptRawDataDrop Invalidate
AcceptTextDrop Refresh

Examples

You can give a rectangle a sunken or raised appearance using the global functions LightBevelColor, DarkBevelColor, and FillColor.

// Sunken Appearance
Me.BorderWidth = 2
Me.TopLeftColor = DarkBevelColor
Me.BottomRightColor = LightBevelColor
Me.FillColor = FillColor

// Raised Appearance
Me.BorderWidth = 2
Me.TopLeftColor = LightBevelColor
Me.BottomRightColor = DarkBevelColor
Me.FillColor = FillColor

See Also

RoundRectangle control; Graphics, RectControl classes.