Changing Text Color Based on a Value


#1

In my app I have a page which displays battery values. There are over a 100. I would like to put a small led button next to each one but I can’t get the image indicator small enough. My next choice would be to change the color of the value text to represent the state of the battery: green for good, yellow for marginal, and red for bad. I seem to recall that was available in PAC Display but since the push from Opto seems to be away from that to the Groov environment, is there a way I can do this in Groov? Here is what a portion of that page looks like:

Thanks,

Dave


#2

Rather than using the image indicator, the gadget I would be using is the LED gadget.
It can can be sized down to about (not quite) 1x1 pixel… ie, crazy small.
Also, the LED gadget can be multi color, just as you need.


#3

The LEDs support color ranges now too, in the same way that image indicators do. Just attach it to a numeric tag and you’re good to go.


#4

That’s perfect. Haven’t tagged the actual values yet but it looks great. Thanks guys!


#5

Nice!
Glad its working for you.

Personal preference, but I would put the LED all the way to the left in front of the zone name.
This way it is quicker to see what zones are in what state at a glance rather than having to flick your eyes back and forth to ‘read’ each row.


#6

You’re right. Does look a lot better. ;-}

Thanks Ben!