Boolean controls and indicators have Boolean text labels in addition to their owned labels. Boolean text labels change depending on the value of the control or indicator. Initially, most Boolean controls and indicators display the word ON in the TRUE state and the word OFF in the FALSE state. When you click the button with the Operating tool, the control toggles to the opposite state.
Tip Label the Boolean object so that its name corresponds to the state of the control or indicator. For example, use ON for TRUE and OFF for FALSE. Also, indicate the default state in parenthesis.
By default, the label centers on the button. Complete the following steps to practice manipulating the label.
Add a push button to the front panel.
Add Find
Right-click the button and select Visible Items»Boolean Text from the shortcut menu. The word OFF appears on the Boolean button.
With the Positioning tool, select the text and move it to the location you want. Also, you can select Lock Text in Center from the shortcut menu to return the text to its default location. To unlock the text, right-click the Boolean button and select Release Text from the shortcut menu.
Use the Labeling tool to change the text in either state. For example, change ON to YES.
Select the Boolean text and use the Text Settings pull-down menu on the toolbar to change the font, size, and color of the text.
Hide the Boolean text from both states by right-clicking the button and selecting Visible Items»Boolean Text from the shortcut menu.
By default, you can change the label for each state of labeled buttons located on the Controls palette. To do so for labeled buttons such as OK and Cancel buttons, you must edit the button to allow different text strings for each state.
Complete the following steps to edit a labeled button to allow multiple text strings.
Verify that the Boolean text is visible. To display the Boolean text, right-click the control and select Visible Items»Boolean Text from the shortcut menu.
Right-click the button and select Advanced»Customize from the shortcut menu to display the Control Editor window.
In the Control Editor window, right-click the button and select Multiple Text Strings from the shortcut menu.
Select File»Apply Changes.
If you want to use the button in other VIs, save it as a custom control.
You also can use the Boolean properties to manipulate Boolean labels programmatically.