UserGuide

Web Rectangle

From Xojo Documentation

A Rectangle control draws a rectangle that can be of any length, width, and background color. By default, rectangles are 150 pixels in length and width, with a black border that is 1 pixel thick and a white center. You can change some elements of the appearance of a Rectangle by via the Style property.

For example, via the Style property you can change the color and thickness of the border.

Properties

Left, Top, Width, Height

These values change the position and size of the rectangle.

Style

Provides access to properties that can be used to change the WebRectangle's appearance.

Usage

Generally you configure a Rectangle in the Inspector. However you can also change Rectangle properties, such as its Left, Top, Width, Height and Style in code.

For example, in a WebRectangle's Shown event, you can change the border color and thickness like this:

Me.Style.BorderColor = Color.Blue
me.Style.BorderThickness = 5

See Also

WebRectangle class; UserGuide:Web UI, UserGuide:Web Styles topics