Workbench User Guide : Creating Toolbars : How You Can Create Toolbar Items : Create a Toggle Field
 
Share this page          
Create a Toggle Field
You can create a toggle field for a toolbar using the Property Inspector.
To create a toggle field for a toolbar
1. Click Insert, Toggle Field in the Toolbar Editor.
A typical toggle field is added to the toolbar.
2. Click the BgColor property and select a background color from one of the palettes.
3. In the OffLabelText property, enter Inactive or other text for the off state.
4. Similarly, in the OnLabelText property, enter Active or other text for the off state.
5. (Optional) Specify other properties for the toggle field, such as HasImageandText and HasIndicator.
Note:  For complete descriptions of each field property, see Toggle Properties and Common Field Properties.
6. Close the Toolbar Editor by clicking File, Close.
You are returned to the Frame Editor.
7. Click Debug, Go on the Frame Editor's floating menu bar to test the toggle field.
The toggle field displays the “off” label text, for example, Inactive, in the running frame.
8. Click the toggle.
The default toggle indicator appears in the toggle field and the “on” label text, for example, Active, replaces the Inactive label.
9. Click the Close button in the upper right corner to close the running frame.
You are returned to the Frame Editor.
10. Click File, Save and Close in the Frame Editor to save the frame with its toolbar.