skip to main content
OpenEdge Development: AppBuilder
Data-Display/Capture Objects : Toggle boxes (check boxes)
Toggle boxes (check boxes)
The toggle box always represents two‑valued, either/or information. You can visually group together many toggle boxes in a logical relationship that you define, but, unlike radio buttons, toggle boxes have no interdependence and are unaware of one another’s settings. Setting one box has no effect on any other unless you write the code to create and manage that effect.
Radio‑sets are best for representing a group of mutually exclusive states; toggle box sets are best for representing a group of independent states.
Creating a toggle box instance
Because toggle boxes are ABL objects, creating one is quite simple.
To create a toggle box instance:
1. Click Toggle Box in the Object Palette.
2. Move the mouse cursor over a bare spot in your workspace and click to place the new object:
3. Configure it, and adjust its size and position appropriately.
Configuring a toggle box instance
You can change some basic characteristics of the Toggle-Box widget’s appearance and behavior through its property sheet, if the default settings do not meet your needs.
To configure your toggle box object, begin by selecting it and choosing ToolsProperty Sheet. The Property Sheet dialog box appears:
Minimal configuration
Although you can accept other default settings, you should at least make the following changes:
*Object — Change the object identifier to one that better reflects the role of this toggle box in your application.
*Label — Change the label to a string that will help the user of your application understand what the toggle box selects.
Note that it will be better for your users if you do not create cross‑connections in their heads: the cleared state should always represent the not/off/false/negative condition, not the default condition. Initialize the box to whatever the default condition is, whether set or cleared.
*Initial Value — By default, the toggle box initializes itself to the cleared state. To change that, click the Advanced button, and when the Advanced Properties dialog box opens, type yes into the Initial Value field.
You can offer additional help to your users through these settings:
*Tooltip — The check box displays this string whenever the user allows the mouse cursor to hover over the object’s frame.
*Help ID — If you plan to provide context‑sensitive help, type in a unique integer identifier.
Reflects the XY origin and size, in character units, of the object’s bounding box. By default, the object’s origin is considered to be the upper‑left corner. You can elect to have AppBuilder consider the origin to be the upper‑right corner instead, though this will not change the object’s position in any way.
For more information on all the settings on the property sheet, see the online help.
Advanced properties
A toggle box widget has only the standard advanced properties, but you can change those that do not meet your needs. See the “Advanced properties” section for more information.