Start a new topic

xstr with NULL background fails

In the documentation for xstr it says "if you do not want any background color, use NULL" however I cannot get this to work. In the v0.36 editor the following results in a compilation error:


xstr 16,200,140,100,2,65535,NULL,0,0,1,"HELLO"


replacing NULL by RED makes it wotrk (but obviously doesn't have the desired effect). I have tried many similar combinations and none work. What's the trick?

Try this:

Makes a crop image background so no image background color.

xstr 16,200,140,100,2,65535,0000,0,0,0,"HELLO"

Yes, I'm using a crop image as a work-around, but it's more complicated because I have to figure out which image is appropriate given the state of things.

Yes you are right that is just a workaround.

NULL (as written in the documentation) does not work, this should be fixed by Itead.

I thought you are not even using crop image as a workaround.

Sorry for the long wait for a reply.

The Nextion Instruction Set now clearly states how to use xstr with no-backcolor.

I am not certain how long it was incorrect or when it was corrected

For no background color sta parameter has to be the value 3

xstr 100,100,100,20,0,RED,BLACK,1,1,3,"China"

This will now be marked as solved.