Start a new topic

Change color progressbar from serial device


i would love to have a function which allows to change the color of a progress bar from serial interface.

If a progress bar is used as a indicator for i.e. temperatur it would be nice to have a red, yellow/orange, green, yellow/orange, red style to see if the value is inside the target value.



2 people like this idea

you mean, something like this?
Just send bar.val=xxx  where xxx is a value from 0 to 100

All the rest is a result of your graphical skills ...



(19.9 KB)

1 person likes this
or this with fixed colors
0-31 = green
32-65 = yellow
66-99 = red

same remote as above, bar.val=xxx


(4.17 KB)

2 people like this

Hello Gerhard,

thanks a lot, the second idea is great.

I have not known that if there are 3 components, always the last updated is the top one.



But i think we can keep this here for features, maybe the color can be changed directly as a command ;)

in any case you must "interprete" a value and generate a given color out of this value.
Either on your MCU, or directly on the Nextion ... a new "command" for this wont give any real advantage ...
Easy saying, just use what you have ... that's much more than you may expect ... :-)



Thats right :-)

But it would be nice to set the color for one component.

I did a lot of workarounds, so i can live with this one too, and hey, this is a feature request and maybe someone will listen to it ;-)

1 person likes this

I am now reviewing all of the Feature Requests, this will take some time, patience please.

SendCommand("j0.pco=32") and SendCommand("j0.bco=2016") changes progress bar colors.

Older editors will also need to SendCommand("ref j0")

This was implemented