Hi - I have a text field that I'd like to change the width of (not the character max, the actual size) from an arduino.
I'm sending a serial line like this:
The X position changes successfully, but the width does not. Am I wrong to be using ".w"?
As documented in the Nextion Editor Guide, you can only change the attributes at run time that are shown green in the editor's attribute pane.
I deduce you are using an "intelligent" class device which permits x and y to be adjusted, but not w and h. The lower class devices don't allow changes to x and y either.
You have deduced correctly, and I can see here in the Nextion editor that w/h are not green, so I will now go cry and try to figure out what's next.
While I'm bothering you, my new solution uses pictures. Unfortunately, sending the picq command over serial from the arduino doesn't work:
Yet the command "picq 322,238,60,4,126" works perfectly fine from within the Nextion's page event programming.
Not getting any errors or hangups of any sort, but I have noticed that other GUI commands don't work via serial either, such as draw, line, fill, etc. But changing properties of existing components is just fine (.txt, .val, etc). It's strange...
All I can suggest is to test with a bare-bones Nextion project and Arduino sketch to eliminate as many variables from the system as possible. If it still doesn't work, then post the sketch and HMI file on the forum.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.