for a multi language interface I'd like make visible only one picture (a small flag in this case) in a corner of the display.
The flags to choose from are 4 and they are, obviously, equal both in dimension and position on the screen.
So I have the problem to hide 3 pictures and to show 1.
I tried the methods (supposing p1 the picture) p1.setPic and p1.getPic without success.
To be clear I enclose a very simple arduino sketch and the relative HMI file.
What am I doing wrong?
Thanks for any help
There are 2 pages in the HMI file.
I'm referring to page 1.
Thanks for the answer.
In your example the switch is made through a touch press event.
I do not know how to send the command directly from arduino without any touch event.
No, it doesn't work with Serial1.print("p0.pic=2ÿÿÿ");
I have 4 pictures :
NexPicture p1 = NexPicture(1, 7, "p1");
NexPicture p2 = NexPicture(1, 3, "p2");
NexPicture p3 = NexPicture(1, 4, "p2");
NexPicture p5 = NexPicture(1, 6, "p5");
To select let's say p2 that is on page=1 with id=3 and name "p2" I do not think that
will make the choice hiding the other flags.
In any case thanks for your help.
Now it's clear and it works !!!
One thing, that may be of interest to someone else, from arduino you have to use the function
assuming p1 as the object and 9 the number of the jpg in the editor.
Thanks a lot for your time and very kind co-operation.
If you are using the ITEAD Library, there is an example, CompPicture. p0.setPic(number) is the function to send from arduino.