Start a new topic

Dynamic Background Image

Hello!


I have been looking to see if its possible to dynamically change the background image of a page.


I have the page settings to sta: image and pic: 1 and I want to change it to pic=0 during run time but I can't figure it out.


Page4.pic = 0, Settings.pic=0 do not work and I can't find any documentation in regards to the page settings attribute commands.


All images for the background will need to be included in the HMI project and as a background, they will need to be the same full resolution of your Nextion model. Once loaded into your HMI project there is a picid number below each picture.


For each page in the project to use the backgrounds,

    the .sta attribute needs to be changed to image

    the .pic attribute needs to be selected to their default background


You would then be able to use page0.pic=2 or page0.pic=1 (no spaces)

This would set the page background to your full size pictures with picid of 2 or picid of 1



Odd.. I just tried it in a brand new project and it works just fine but the one I am working on, it gives me an error in the debug console about variables. I'll start from scratch


Login or Signup to post a comment