To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This is a simple example where the color of a color numeric control changes according to the numeric value on a dial.
Description
This example makes use of an EVENT_COMMIT callback on a dial. We use the GetCtrlVal function to determine what value is stored in the dial. Using this and a simple 'if' statement, we use the MakeColor function to dictate what color will be displayed on the color numeric control. See the following resources for additional information:
https://www.ni.com/docs/en-US/bundle/labwindows-cvi/page/cvi/uiref/cvimakecolor.htm
https://www.ni.com/docs/en-US/bundle/labwindows-cvi/page/cvi/uiref/cvisetctrlval.htm
Steps to Implement or Execute Code
Requirements
Software: CVI 2012 (or later)
**This document has been updated to meet the current required format for the NI Code Exchange.**
Description-Separate-2
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.