Start a new topic

Slider with moving text


Hi guys, I'm trying to make something like I found od google (image above). I know how to make slider and I know how to insert number field, but when I try to make code: n0.y = h0.val + 10 it report error. What sould be the right code?


Thank you in advance.


 n0.val ?

Gerry, n0.val = h0.val gives me number on slider, but I also need to move n0 with slider up/down. So I need something like n0.y = h0.val + 10, and this reports error. What am I doing wrong?

n0.y = h0.val + 10 is just NOT a valid expression ...

n0 can only be accessed via n0.val ... the y property can't be set ...

only green colored properties can be set ...

have a look to the xstr function ...

 

Components in the HMI design as fixed position (x,y,and w,h) and used via lookup tables by the Nextion firmware at runtime.  As such Components can not be dynamically positioned at runtime.


As Gerry has pointed out there is a GUI set of commands in the Nextion Instruction Set (xstr is one of) that can be drawn dynamically at runtime.

maybe something like this ... :-)

HMI

Thank you Gerry, that's exactly what I wanted. I tried with xstr, but it duplicated text all over...

image


I can get close with the xstr command as Gerry recommended

but dots don't go orange/gray with slider values without more graphic work


found it better to put the numbers under the slider and

have the slider magnify the number underneath.

image


tft
(156 KB)
Login or Signup to post a comment