Associate the LED color with the spin box
Control the color of the LED object by changing spin box values at runtime.
- InProject view, selectLED1.
- InProperties, create a complex dynamic link with aKey-value converterbetween theColorandValueofSpinBox1:
- Source Dynamic link
- .
For more information about dynamic links, see Create dynamic links. - In the complex dynamic link editor, next toKey-value converter, select .
- In the editor, next toValues, selectStringand selectColor.TIP: If you do not see the required option, select theShow allcheckbox.
- Add two rows by selecting two times.
- Set the values as follows:Keys (UInt32)Values (Color)0#cd163f1#f580252#00aeef
- InProject view, selectSpinBox1.
- InProperties, setMinimum valueto0.