DEFINE RECTANGLE statement
Defines a rectangle widget that is created at compile time for use within a single procedure or class.
Note: Does not apply to SpeedScript programming.Syntax
[ PRIVATE ] RECTANGLErectangle
Defines and identifies a rectangle widget as a class-scoped object. A class-scoped handle-based object is not a member of a class, but provides a resource that is privately available to the class definition similar to a non-shared data element in a procedure definition. The option to specify the PRIVATE access mode is provided for readability. You cannot specify PRIVATE when defining a rectangle widget as a data element in a method or procedure.Note: This option is applicable only when defining a class-scoped rectangle widget in a class definition (.cls
) file.RECTANGLErectangle
LIKErectangle2
NO-FILLEDGE-CHARSwidth
EDGE-PIXELSwidth
DCOLORexpression
BGCOLORexpression
FGCOLORexpression
GRAPHIC-EDGEPFCOLORexpression
ROUNDEDGROUP-BOX
Specifies the rectangle as a group box, which surrounds one or more user interface widgets to visually indicate a relationship among the widgets. The appearance of a group box changes automatically to conform to the current display setting. When the display is set to the Windows XP Theme, the group box rectangle appears with rounded corners and a single-line border. When the display is set to the Windows Classic Theme, the group box appears with square corners and a shaded double-line border.This option is ignored in character interfaces.size-phrase
Specifies the outside dimensions of the rectangle widget. This is the syntax forsize-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 valueswidth
andheight
must be decimal constants. For pixels units, they must be integer constants. For more information, see the SIZE phrase reference entry.TOOLTIPtooltip
Allows you to define a help text message for a rectangle widget. The AVM 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 compile-time defined rectangle you are defining, you must define a compile-time defined frame that contains the rectangle. Each frame you define that contains the same rectangle creates an additional instance of that rectangle. The handle for a compile-time defined rectangle is not available until the rectangle is created.
- You can specify an application-defined widget ID for a compile-time defined rectangle widget using the
form-item
phrase in either the FORM statement or the DEFINE FRAME statement. See the FORM statement and DEFINE FRAME statement reference entries for more information.- When defining a rectangle, you must specify either the LIKE option or the size phrase.
See also
OpenEdge Release 10.2B
|