How to Make Numeric Text Field Blink Different Color Based on Tag Value

Hi,

This is probably a very newbie-ish question, but we have a value in a numeric text field that gets its value from a memory tag, and when the value hits a certain number we want the text field background color to change color from its original green to red. Was wondering if someone could point us in the right direction to getting this going.

I’m assuming in the property editor in the background color, i can maybe bind the property to the text field?

Oh, and is there a way to make the color blink red while its at that certain value? and then have it go back to its original state once the “high limit” is cleared?

Thank you.

James

This is on a fill paint property, but you can use this to achieve what you want.

2 Likes

You can also use the Style customizer, especially for animation(such as blinking).

Right-click on the component :fast_forward: Customizers :fast_forward: Style Customizer.

More information on component customizers from the manual.

Also, here is a video on Inductive U.

2 Likes

Thank you Jordan! That was super helpful, and I managed to animate the numeric text field. Can i ask another question?

So I have the style customizer animate the numeric text field at a certain value (so our max limit we want is 20 and when the value gets to 20 it blinks red and white). But I also want to involve a value from another tag to this numeric text field.

For example, assume that the numeric text field we animated pulls in its value from TAG1, and when the value of the other tag (we’ll call it TAG2) is (throwing out a number here), 10, then the numeric text field will not animate, EVEN IF the max limit of 20 for TAG1 is reached. But if TAG1 is less than 10, and TAG2 is 20, then it will animate.

I was hoping there was some sort of expression field where we can tie in another tag value but I can’t seem to find it, or know if I’m using the right component to try to sort this out.

I’m hoping i make sense here.

I would appreciate any responses. Thank you!

James

To tie in two values, you’ll need to build an expression that references both tag values, and decides appropriately what ‘state’ you’re in - then you can drive the style customizer off that one state. The order of operations in expressions is fixed, so you can decide which tag takes precedence.

1 Like