cancel
Showing results for 
Search instead for 
Did you mean: 

[TouchGFX] textArea displaying "?" instead of string

AJT
Associate III

Hello,

I'm currently developping an application on a STM32H7 with touchGFX.

In touchGFX designer i've a text area and I want to change the text of this area when an action is done. Here is a part of my code related to the update of the text:

Unicode::snprintf(textArea_resident_nameBuffer, 16, "%s", "ALBERT DUPONTEL");
textArea_resident_name.invalidate();
textArea_resident_name.setVisible(true);

and the result (touch is the initial value and ???? is the value of the wildcard) :

0693W000004IhUpQAK.png

Is this the right way to changer text (by using wildcard because the function setText needs a TypedText and i didn't find a way to convert a String to a TypedText)

Do you know where the problem can probably come from ?

Regards,

Ajt

1 ACCEPTED SOLUTION

Accepted Solutions
AJT
Associate III

Well the zone was larger enough to display my text, the main problem came from the wildcard range that I didn't define. For example, i had to define 0x41-0x5A in touchgfx designer to use all capital letters.

Thanks

View solution in original post

3 REPLIES 3
MM..1
Chief III

You omit some lines ... example

   Unicode::snprintf(textAreaVerBuffer, TEXTAREAVER_SIZE, "1.%d", VERSION);

   textAreaVer.setWildcard(textAreaVerBuffer);

   textAreaVer.invalidate();

   textAreaVer.resizeToCurrentText();

   textAreaVer.invalidate();

AJT
Associate III

Well the zone was larger enough to display my text, the main problem came from the wildcard range that I didn't define. For example, i had to define 0x41-0x5A in touchgfx designer to use all capital letters.

Thanks

Yes this is second condition set ranges A-Z or more when you need numbres usw in designer.