From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Example Code

Changing the Color of a Front Panel Programmatically

Code and Documents

Attachment

This VI shows how to change the color of a VI front panel programmatically. This feature is introduced in LabVIEW 6.0.

Run the VI and click the color box to change the front panel color.

A vertical smooth box is behind the color box for contrast from the rest of the front panel. Create the color box control by right-clicking the color box constant and selecting Creat » Control.

The Property Node, left unwired by default, references to the current VI. The front panel is a read-only object with properties in the Generi » GObject class. Right-click Color, the bottom half of the Property Node, to display the Help For Color and other front panel properties.

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Contributors