Example Code

Using Property Nodes to Change the Color of a Slide Bar in LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Download All

1. Overview:
This VI changes the colour of the slider depending on its value. It has 3 range values

 
2. Description:
This example program uses an event structure along with a property node to select the color of a slide bar control. It uses Threshold 1D Array with an array of colours in order to get the proper colour depending on the new value of the slider. It also uses an indicator to indicate the current state.

 
3. Requirements

  • LabVIEW 2012 (or compatible)

4. Steps to Implement or Execute Code

  1. Run the VI
  2. Change the value of the slider
  3. Color of the slider control and value of the indicator will change depending on the slider control value  

5. Additional Information or References

Block diagram.JPG

 

**This document has been updated to meet the current required format for the NI Code Exchange.** 

John Passiak

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