cancel
Showing results for 
Search instead for 
Did you mean: 

Display problem when changing text of a textArea

AJT141
Associate III

Hello,

Hello,

I'm currently developing an application on a STM32H753VT6 with touchGFX and I have an issue with the function resizeToCurrentTextWithAlignment(). Indeed when i'm changing the current text (I use a Wildcard) with another text smaller there is no problem. But when I'm changing this text again (same value) and an invalidate the textArea, the old text appears on my screen (R and E of the last word displayed "Residence") :

0693W0000059ihbQAA.jpg 

Any idea of why there are these kind of glitches ? Here is my code :

// first I update the wildcard buffer
Unicode::strncpy(textArea_residenceBuffer, s_current_command_splitted.c_first_line_a, MAX_NB_CHARS);
// then i resize the text area 
textArea_residence.resizeToCurrentTextWithAlignment();
// finally I invalidate the area 
textArea_residence.invalidate()

Thanks,

Best regards,

AJT

1 ACCEPTED SOLUTION

Accepted Solutions

Hi,

It should be fine in your case, especially with an STM32H7. Your UI also does not seem to involve complex animations or calculations. I would not recommend to refresh the full screen for low cost solutions.

The issue you faced was that you did not refresh the entire zone where you did modifications. You only modified the content of the text. If your background is just white, you could put a white box under the text zone that you refresh instead of the whole background. Or you could try to put the text in a Container widget and refresh the container, that should do the job as well.

Try the different solutions to see what suits your project the best.

/Romain

View solution in original post

5 REPLIES 5
Romain DIELEMAN
ST Employee

Hi,

Could you try to invalidate the background /image behind it as well?

/Romain

AJT141
Associate III

looks like it works !

Is it not too much too invalidate the whole background ? (in terms of processing ?)

Thank you,

AJT141

Hi,

It should be fine in your case, especially with an STM32H7. Your UI also does not seem to involve complex animations or calculations. I would not recommend to refresh the full screen for low cost solutions.

The issue you faced was that you did not refresh the entire zone where you did modifications. You only modified the content of the text. If your background is just white, you could put a white box under the text zone that you refresh instead of the whole background. Or you could try to put the text in a Container widget and refresh the container, that should do the job as well.

Try the different solutions to see what suits your project the best.

/Romain

AJT141
Associate III

Hello,

Nice answer this is crystal clear ! 👍

If STM32H7 is not a low cost MCU, why should i not be able to create this animation (still do not have the answer) : https://community.st.com/s/question/0D53W00000KH5v9SAD/multiple-circles-display-leads-to-frame-rate-drop

thank you again !

AJT141

I'll answer on the other topic but alpha over alpha implies a lot of computation.