Dynamic Color

Parent Previous Next

Dynamic Color

This property allows to modify the color of the border, fill among other properties of an object during Runtime based on the value of a tag or expression.


To configure the Dynamic Color, follow the steps below:


1.   Click the Dynamic Color tab "Dyn".


2.   Click the (...) button to select the default Color using the brushes dialog.


3.   In the field expression, insert the desired tag or expression.


4.   In the field Value, insert the expected value of the tag or expression.


5.   Click the (...) button to configure the desired color for the configured value using the brushes dialog.


6.   Select the desired color.


7.   Click the OK button.


8.   Configure as many values as you want, repeating the steps 4 to 7.


9. Click the OK button to finish the Dynamic Color configuration.



Example 1: Configuring with a tag only.



graphic



In this example, the border of an ellipse object will be colored according to the value of the tagColor. If its 1, border color will turn to black during runtime. If its 2 it will be red. But if its different than that, it will use the default color, in the example it is gray.


Example 2: Configuring with a tag and an expression.


graphic



The expression is checking if the value of tagColor is 1. If so, it returns 1 coloring the border black. If it is different than 1, it will be colored red. In this case there is no need for setting the default color.