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
- .
- 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 selectingtwo times.
- 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.
Changing LED color
![](/content/dam/dita/en/factorytalk-optix/1-4-0/_images/quick-start-led-color-0.png/_jcr_content/renditions/original)
![](/content/dam/dita/en/factorytalk-optix/1-4-0/_images/quick-start-led-color-1.png)
![](/content/dam/dita/en/factorytalk-optix/1-4-0/_images/quick-start-led-color-2.png)
Provide Feedback