Skip to main content
AJT
Associate III
October 5, 2020
Solved

[TouchGFX] textArea displaying "?" instead of string

  • October 5, 2020
  • 3 replies
  • 2366 views

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

This topic has been closed for replies.
Best answer by AJT

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

3 replies

MM..1
Super User
October 5, 2020

You omit some lines ... example

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

   textAreaVer.setWildcard(textAreaVerBuffer);

   textAreaVer.invalidate();

   textAreaVer.resizeToCurrentText();

   textAreaVer.invalidate();

AJT
AJTAuthorBest answer
Associate III
October 5, 2020

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

MM..1
Super User
October 5, 2020

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