Toggles (Check Boxes)
A toggle appears as an option that the user can click on or off (enable or disable). The label for a toggle can be text or an image. You can supply one text phrase for both states and use the toggle indicator, or you can turn off the toggle indicator and supply separate phrases or images for the on and off states.
Note: For more information about how text and image labels and the indicator interact, see the ToggleField class topic in the Language Reference Guide.
To display a group of toggles, you should create a toggle stack. When the toggles are included in a stack, rearranging the order of the toggles is easy because OpenROAD helps to ensure that they are always correctly aligned. For more information about creating stack fields, see
Create a Stack Field.
Create a Toggle (Check Box)
You can create a toggle on a form.
To create a toggle
2. Select the Toggle icon on the field palette.
3. Place the toggle field on the form.
Note: When determining the placement of a toggle field on a form, keep in mind that its size is determined by its contents (text or bitmap).
4. Set the properties for the toggle field, including HasImageandText, HasIndicator, OffTextLabel, and OnTextLabel.
Toggle Properties
All the properties for toggle fields are described under
Common Field Properties, with the exception of the following properties or values that are specific to the toggle field type:
HasImageandText
Specifies whether to display both an image and text as the label
Default: FALSE
Note: If HasImageandText is set to TRUE and a bitmap label is specified, the HasIndicator property is ignored. If neither OffBitmapLabel nor OnBitmapLabel is specified, then the toggle field behaves as if HasImageandText is FALSE.
HasIndicator
Specifies whether a toggle indicator, a check mark, is displayed next to the label
Default: TRUE
OffBitmapLabel
Specifies a file containing the image to be displayed when the toggle is disabled. When you click this button, a standard File Selection dialog appears. Enter the directory path of the new image you want to use.
If you specify the OnBitmapLabel property but do not specify the OffBitmapLabel property, OpenROAD uses an inverse of the OnBitmapLabel bitmap image as the OffBitmapLabel.
Default: No Bitmap
Note: If OffBitmapLabel is set to Bitmap, then the HasIndicator property must also be set to TRUE.
OffTextLabel
Specifies the text displayed when the toggle is disabled
Default: Toggle Item
OnBitmapLabel
Specifies a file containing the image to be displayed when the toggle is enabled. When you click this button, a standard File Selection dialog appears. Enter the directory path of the new image you want to use.
If you specify the OffBitmapLabel property but do not specify the OnBitmapLabel property, OpenROAD uses an inverse of the OffBitmapLabel bitmap image as the OnBitmapLabel. See the example in OffBitLabel.
Default: No Bitmap
Note: If OnBitmapLabel is set to Bitmap, then the HasIndicator property must also be set to TRUE.
OnTextLabel
Specifies the text displayed when the toggle is enabled
Default: Toggle Item