2020-10-05 08:23 AM
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) :
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
Solved! Go to Solution.
2020-10-05 09:13 AM
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
2020-10-05 08:55 AM
You omit some lines ... example
Unicode::snprintf(textAreaVerBuffer, TEXTAREAVER_SIZE, "1.%d", VERSION);
textAreaVer.setWildcard(textAreaVerBuffer);
textAreaVer.invalidate();
textAreaVer.resizeToCurrentText();
textAreaVer.invalidate();
2020-10-05 09:13 AM
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
2020-10-05 09:29 AM
Yes this is second condition set ranges A-Z or more when you need numbres usw in designer.