Start a new topic

Vertical Guage and Background

I am trying to set a vertical gauge on a page with the background of the gauge the same as the page it is on. 

I set the foreground to another image (all red). 


When do this I get a debug message

Error Drawing off screen - cancelled


Please help



Had anyone actually selected Help from the Nextion Editor Help Menu (or Instructions Tab)

   they would have been taken to the Nextion HMI Solutions page

There they would have discovered Nextion Quick Start Guide ...


Here one would have discovered nice progress bar was done two years ago

- but why should anyone use Nextion Help?


image


HMI
(39.9 KB)

and just to mention, in case ...


every object with "crop image" property can be used in this easy way ...


So, many ways to do exactly what you want, there is really no need to chage the native ProgressBar ...

nice!

have also a look to our Gallery, "Tutorial / TrickySliders ..."


SliderBars the different ProgressBars ...

and just to proof ... a ProgressBar without a ProgressBar Object, but with Croped Image Background ...


just place the Bar Object wherever you like, scale it to whatever you like ... and let it run ...


so, it seems not to be that complicated to achive what you like with what you already have ...

HMI

 and with the right design, you even can reuse your graphics ...

HMI
a ProgressBar is just what it is, a balanced 100% display of 2 images ... to do it in this way was just a question of design ... and it also makes sense ... not everybody like to use a complex fullscreen graphic as background ...and in case of a single colored background, such a fullscreen graphic takes much more ressources than a few small ones ...

so, it is as it is, and it is well documented ...

anyway, nobody force you to use a Progressbar Object, a SliderBar in combination with some fill/line commands can do the same ... that all depends on which visual effect you like to achieve ...

but I guess, the most simple way is still, to design the whole screen once with an external graphic programm, and cut out the parts you need as separate small graphic

Yes

I now realise that it doesn't have a crop feature. I thought that the reference to the backgpund image would crop.  This lack of cropping means a work around for any bar chart on a background. What a waste of time to have a 'third' graphic as Vlad notes in his forum mention.

Yes there are indeed some bugs ... but morelike inside your logic rather than inside the Nextion Editor ...

   - there is NO "vertical Gauge" existing, sorry, your whole title is already wrong ...
   - you are using a ProgressBar ... not a Gauge !!!!  ProgressBar<>Gauge

I just had a quick look to your first HMI ...

    - a ProgressBar has NO CropedImage property
    - when you use a ProgressBar in size of 20x150 in size, but attache a picture of 240x400, what do you expect???? How shell this work???

This is also the reason, why you get the "drawing out of screen" error ...

    - when you try to draw a 240x400 pixel picture inside a 20x150 object, which is even located at screen-position 20x150, such an error is normal and describes exactly your fault ...

When you like to use pictures as ProgressBar properties, the pictures also should have the same size as your ProgressBar ... bigger ones automatically end up in garbage ...

This clearly shows the problem

The background picture is offset by the x and y value of the progress bar


In the case of the top one no change as it is x=0 y=0




docx
(22.4 KB)

Looks like it faults for both the vertical options..... Bug?

Just to advise

If I run on a horizontal Nextion arrangement ( NX4024T032_11 then it works fine

The above program was in the vertical 

I have forwarded another test screen. This does not provide the error but a strange result!

here is code and the associated pictures

HMI
Background.png
(1.26 KB)

 without seeing your HMI, to see what exactly you did, it is impossible to help ...


because your description is far too vague ...

Login or Signup to post a comment