Hi Everyone,
I am using an M5Stack CoreS3 and UIFlow2 Alpha-27.
I am new to ESP32 and M5Stack, so not sure if this is a bug in UIFlow2, MicroPython, or it is expected behavior and my understanding of the way it should work is incorrect... :-)
I am trying to update labels with values on a regular basis, the label is in front of a rectangle and the background of the label is the same color as the foreground of the rectangle.
However, it seems that when I update the label text, and the length of the text is smaller than the previous length, it leaves an empty space at the back of the label with the background color. I.e., it does not re-render the 'missing part' of the rectangle.
I could redraw the rectangle after the update, but then the rectangle will overwrite the text.
I could redraw the rectangle and then rewrite the text, but if the value has not changed, it will not write it on the screen and it remains hidden.
The only way to do it is to make the label text empty, draw the rectangle, and then fill the label text with the new value.
That seems like a lot of work just to update a single text label, it also sometimes introduces a flicker (I have quite a number of labels to update)
Is this a bug ? And is there any way around this (without having to clear and redraw all the screen elements one-by-one)?
Here is a minimum program to show the issue:
And the output:
Thanks
Richard