just working on my project here, playing around with the components to get a feel for designing. JW is there a way to make the label component blink in visibility?
Im able to alter the visbility off/ on depending on the tag binding, but if the tag was to be true i.e. an alarm, how would I make the image/ label component blink?
I would recommend not using blink animations via the style customiser (I presume this is what you’re using elsewhere?).
These are not synchronised between components and look unprofessional if you have multiple components all blinking out of sync with each other.
I use a client tag that is pulsed with a client timer script. I then also use this for component visible bindings to flash them as well
hi @bpreston, where would i incorporate this …can it be on the script editor or would it only fall into the client timer script?
Thank you for the participation!
@nminchin mentioned cycling a client tag using a client timer script. For the way I mentioned you don’t need the client timer script at all. When you set up your client tag, you go to the Expression/SQL section of the tag and set it to expression and insert the expression I showed. That expression does a 1 second pulse. You can change it based on how fast or slow you want the pulse to be.
I should mention, the reason I put into a client timer script is because I have various pulses defined, 125, 250,500,1000,2000ms
I really only use the 500ms and it was easier to calculate these via script than expression. If you don’t need pulses faster than a second, you can certainly do as @bpreston says.
else condition color (‘rgb(217,0,0)’)to be changed from red to yellow n vice versa basically it should blink, how it is possible? how can I give 2 colors on else condition
by doing the above expression binding on the label, I am getting the proper output but it’s not changing the color of the label as I am getting error_cycle detected.
Well, I suppose you could use an expression with RGB values to do it… but it certainly wouldn’t be the recommended way. Regardless, to use an expression like you are, you need to use an alternating value to alternate the colour between your two colours. E.g. using a session prop set with an expression to flip-flop between false and true. Then your expression would be:
@ 0 and 100% added bg color then on label text under expression binding, added transform, below scripting transform to get the background for the label Hope this helps others too
a="Sufficient Volume"
b="Refill Tank"
if value==0:
self.props.style.backgroundColor="#5FB478"
self.props.style.classes=None
return a
else:
self.props.style.classes="NewStyle"
return b
Instead of animating the background colour in the Perspective style, animate the font colour.
You can also animate the opacity which will animate it's visibility