skip to main content
OpenEdge Development: AppBuilder
Organizer Objects : Rectangles
 
Rectangles
Rectangles are the simplest organizer objects. Their role is entirely visual. Rectangles can be nested within frames and can be placed within or partly within (overlapping) other rectangles. You can place SmartObjects on a rectangle as long as there is an appropriate Smart organizer (SmartWindow, SmartDialog, or SmartFrame) to support them.
By default, a rectangle appears as a figure with a closed, sunken border 2 pixels thick, as shown:
By combining a text widget with a rectangle, you can create an object similar in appearance to a Windows frame widget. For example:
There is no line object in ABL, but by carefully sizing, positioning, and coloring one or two rectangles, you can create the illusion of a line object. This can be convenient as a visual spacer.
Creating and placing a rectangle
Because rectangles are basic ABL objects, creating and placing one is quite easy.
To create and place a rectangle:
1. Click on the Rectangle icon in the Object Palette.
2. Move the mouse cursor over a bare spot in your workspace and click to place the new object. For example:
3. Configure the rectangle, and adjust its size and position appropriately.
Configuring rectangle properties
Rectangles are basic objects, defined in the ABL itself. Not being objects defined by external procedures, they do not have Procedure Settings. Their properties are all contained in property sheets.
To open the property sheet for a rectangle, select the rectangle and choose ToolsProperty Sheet. The Property Sheet dialog box shown in Figure 21 appears.
Figure 21: Rectangle Property Sheet
Minimal configuration changes
You should change the default identifier, shown in the Object field, to a token that more accurately identifies the role of this rectangle in your design.
Border width (edge pixels)
Rectangles can be very useful as a way to visually define a special area, for example one whose appearance will change because of paging. You might wish to make such an area even more visually special by changing the thickness of the border. This rectangle shows a distinctive, eight‑pixel border:
To change the thickness of the border, enter the new value in the Edge Pixels field. The results of specifying too thick a border are undefined.
A value of zero (0) will cause the rectangle border to disappear, effectively making the rectangle itself disappear unless it has a fill of a contrasting color.
Geometry
Normally, the location of a widget is calculated at its upper‑left corner. You can set the location of a rectangle to be its upper‑right corner instead, if you wish, by setting the appropriate radio button.
Additionally, by setting the width or height of a rectangle to zero (0) pixels in the Advanced Properties dialog box, you can create the illusion of a line.
Miscellaneous properties (other settings)
Rectangles are such simple objects that they have very few properties. You can make changes to those few, if the default settings do not meet your needs, as follows:
*Enable — Normally set. Clearing this box causes the rectangle to decline input focus when offered. For this option to be meaningful, you must also set either the Movable or Resizable property. For more information, see the “Advanced properties” section.
*Filled — Normally cleared. Setting this box fills the rectangle with the background color.
*Graphic Edge — Normally set. This box interacts with the Edge Pixels (border thickness) setting as follows:
*Specifying an Edge Pixels value of three or less causes a line‑drawing character to be used for the border in character environments. Values over three clears this box and a block character is used for the border in character environments.
*Clearing this box sets the Edge Pixels value to eight and a block character is used for the border in character environments.
*Hidden — Normally cleared. Setting this box prevents the rectangle from displaying itself in response to implicit requests. See the online help for further information.
Advanced properties
You can make several changes to a rectangle’s behavior or appearance in the Advanced Properties dialog:
Four properties you may wish to modify are:
*Manual-Highlight — Normally cleared. Setting this box allows you to define and use a special highlighting scheme when the object is selected.
*Movable — Normally cleared. Setting this box plus the Selectable and Enabled boxes allows the user to move the rectangle within the bounds of the enclosing frame object.
*Resizable — Normally cleared. Setting this box plus the Selectable and Enabled boxes allows the user to resize the rectangle within the bounds of the enclosing frame object.
*Selectable — Normally cleared. Setting this box plus the Enabled box allows the user to select the rectangle.