Progress
Language Reference
DEFINE RECTANGLE Statement
Defines a rectangle widget for use in the current procedure.
SYNTAX
rectangle
The name of the rectangle you are defining.
LIKE rectangle2
Specifies a previously defined rectangle whose characteristics you want to apply to the new rectangle. If you name a rectangle with this option, you must have defined that rectangle previously in the procedure.
NO-FILL
Indicates that only the outline of the rectangle should be drawn. By default, the rectangle is filled with the background color.
EDGE-CHARS width
Specifies the width of the rectangle outline in characters. The default width is 1. If you do not want an edge on the rectangle, specify EDGE-CHARS 0.
EDGE-PIXELS width
Specifies the width of the rectangle outline in pixels. The default width is 1. If you do not want an edge on the rectangle, specify EDGE-PIXELS 0.
DCOLOR expression
Specifies the fill color of the rectangle in character interfaces. This option is ignored in graphical interfaces.
BGCOLOR expression
Specifies the background color or fill color of the rectangle in graphical interfaces. This option is ignored in character interfaces.
FGCOLOR expression
Specifies the foreground color or edge color of the rectangle in graphical interfaces. This option is ignored in character interfaces.
GRAPHIC-EDGE
Specifies that in a character interface, the rectangle is drawn with graphic characters. This option is ignored in a graphical interface. This overrides the EDGE-CHARS and EDGE-PIXELS options. The border is one graphic unit thick.
PFCOLOR expression
Specifies the edge color of the rectangle in character interfaces. This option is ignored in graphical interfaces. It is also ignored if you specify GRAPHIC-EDGE.
size-phrase
Specifies the outside dimensions of the rectangle widget. This is the syntax for size-phrase.
If you specify SIZE or SIZE-CHARS, the units are characters; if you specify SIZE-PIXELS, the units are pixels. For character units, the values width and height must be decimal constants. For pixels units, they must be integer constants. For more information, see the SIZE Phrase reference entry.
TOOLTIP tooltip
Allows you to define a help text message for a rectangle widget. Progress automatically displays this text when the user pauses the mouse button over the rectangle widget.
You can add or change the TOOLTIP option at any time. If TOOLTIP is set to “” or ? (the unknown value), then the ToolTip is removed. No ToolTip is the default. The TOOLTIP option is supported in Windows only.
trigger-phrase
Specifies application triggers for the rectangle.
For more information, see the Trigger Phrase reference entry.
EXAMPLEThe following example uses a set of thin rectangles as lines to create graphic columns within a frame background.
NOTES
- To create the static rectangle you are defining, you must define a static frame that contains the rectangle. Each frame you define that contains the same rectangle creates an additional instance of that rectangle. The widget handle for a static rectangle is not available until the rectangle is created.
- When defining a rectangle, you must specify either the LIKE option or the size phrase.
SEE ALSO
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |