The colors of the transition cases (True to False
and False to True
) are only visible if the Boolean Control is configured as Switch or Latch when Released
(See Changing the Mechanical Action of a Boolean Object
You can set 1, 2, 4 or 6 Clusters for the states:
- If you pass in only one Cluster, this property uses that values for False, True to False, True and False to True states. Both Hover over Button states will remain in the original setting of the Control.
- If you pass in two Clusters, this property uses the first values for the False and True to False states. Similarly, this property uses the second values for the True and False to True states. Both Hover over Button states will remain in the original setting of the Control.
- If you pass in four Clusters, this property uses the first values for the False state, the second for the True to False state, the third for the True state and the fourth for the False to True state. Both Hover over Button states will remain in the original setting of the Control.
- If you pass in all six Clusters, this property will use every value as described in the solution.
In previous versions of LabVIEW, the Colors property used U32 numeric constants to set the RGB color value of the Boolean case by default. To set the colors of your Boolean control in this case you can:
- Specify a color using these numeric constants using the RGB color code. Usually, this code is specified by a scale from 0-255 for each color. For example, the color red is specified by the RGB code 255, 0, 0. To use this code, convert the RGB code numbers to hexadecimal with the form RRGGBB. You will also need to change the format of the numeric constants in the cluster from floating-point to hexadecimal. Using the hexadecimal RGB codes, enter FF0000 (for red) and 00FF00 (for green) into the numeric constants corresponding to the case associated with each color. In this example, the False case is red and the True case is green.
- A much more intuitive way to specify the color is by replacing the numeric constants in the cluster with color box constants. To do this, delete the numeric constants in the cluster and place color box constants found on the All Functions » Numeric » Additional Numeric Constants palette of the block diagram. After placing these constants in the cluster, specify the color you would like to use by clicking on the color box constant.