ToggleField Class
The ToggleField class represents a field that the end user can click to switch between two states. The integer variable associated with a ToggleField takes values of TRUE (1) or FALSE (0).
The text used to label a toggle field is specified in the OffTextLabel and OnTextLabel attributes.
When you create a toggle field in Workbench, OpenROAD automatically provides an indicator box for the toggle. This box indicates the state (on or off) of the toggle.
If you are using text as labels, OpenROAD uses the OffTextLabel attribute as the field label when the field is off and uses the OnTextLabel attribute when the field is on.
If you use bitmaps to label the toggle, you can set OnBitmapLabel, OffBitmapLabel, or both. If you specify only one of these attributes (either OnBitmapLabel or OffBitmapLabel), OpenROAD uses the same bitmap for both the on and off states, indicating the state change by reversing the colors. (OpenROAD actually places the color-reversed image in the Bitmap attribute that you did not set.) For example, assume that you put an image of a file cabinet in the OnBitmapLabel and did not set OffBitmapLabel. OpenROAD automatically places a color-reversed image of the file cabinet in the OffBitmapLabel and displays that image when the toggle is off.
When you are using bitmaps to label a toggle, you cannot use the indicator to show the toggle's state.
Inherits From
Inherited By
None
Attributes
HasImageAndText
HasIndicator
OffBitmapLabel
OnBitmapLabel
OffTextLabel
OnTextLabel
Methods
None
Last modified date: 12/20/2023