Associate the LED color with the spin box
Control the color of the LED by changing spin box values at runtime.
- InProject view, selectLED1.
- InProperties, create a complex dynamic link withKey-value converterbetweenColorand theValueofSpinBox1:
- Source Dynamic link
- .
For more information about dynamic links, see Create dynamic links. - InComplex dynamic link editor, next toKey-value converter, selectEditFor more information, see Key-value converter.ValueMap editordisplays in the central pane.
- InValueMap editor, next toValues, selectStringand selectColor.TIP: If you do not see the required option, select theShow allcheck box.
- Add two rows by selectingAdd
- Set the values as follows:Keys (UInt32)Values (Color)0#cd163f1#f580252#00aeef
- InProject view, selectSpinBox1.
- InProperties, setMinimum valueto0.TIP: SettingMinimum valueprevents you from providing values that are not handled byKey-value converterat runtime.
- InProperties, setMaximum valueto2.TIP: SettingMaximum valueprevents you from providing values that are not handled byKey-value converterat runtime.
Provide Feedback