Short Name: Colors[4]
Requires: Base Development System
Class: Boolean Properties
To Use: Create a property.
Array of up to 4 (Foreground Color, Background Color) pairs, where Foreground Color is the foreground color of the Boolean control and Background Color is the background color of the Boolean control. Color pairs include False, True, True to False, and False to True.
You can set the color of the front panel object by wiring a hexadecimal number with the form RRGGBB or by wiring the color box constant to the property.
This property is similar to the Colors option on the Appearance page of the Boolean Properties dialog box.
If the Boolean control has four (Foreground Color, Background Color) pairs for the four states, this property always returns an array of four (Foreground Color, Background Color) pairs when reading. When writing, you can pass in an array of length 1, 2 or 4. If you pass in only one element, this property uses that element value for all four states. If you pass in two elements, this property uses the first element value for the False and True to False states. Similarly, this property uses the second element for the True and False to True states.
If the Boolean control has only one (Foreground Color, Background Color) pair for all four states, this property returns an array of one (Foreground Color, Background Color) pair when reading, and uses the first array element when writing. You cannot change a Boolean control with one (Foreground Color, Background Color) pair to a Boolean control with multiple (Foreground Color, Background Color) pairs.
This property only uses the True to False and False to True states when you set the Boolean control to latch or switch when released. You can get and set these (Foreground Color, Background Color) pairs even if you do not have the control set to latch or switch when released; they just are not used.
Because this property does not change the data of the Boolean control, you can set it at any time.
You can use this property for Boolean controls on the Classic, Express, Modern, and Silver palettes. You cannot use this property for Boolean controls on the System palette.
The following table lists the characteristics of this property.
Data type | |
Permissions | Read/Write |
Available in Run-Time Engine | Yes |
Available in Real-Time Operating System | Yes |
Settable when the VI is running | Yes |
Loads the front panel into memory | No |
Need to authenticate before use | No |
Loads the block diagram into memory | No |
Remote access allowed | Yes |