2020-07-16 09:46 AM
I've created a wildcard in Designer using https://support.touchgfx.com/docs/development/ui-development/touchgfx-engine-features/texts-and-fonts/ and updating it in handleTickEvent() as per https://support.touchgfx.com/docs/tutorials/tutorial-03/.
Occasionally it's displayed with garbage e.g. 42?5?352. It's fine in the buffer. TEXTAREA1_SIZE is 10.
void Screen1View::updateTxt(int value)
{
Unicode::snprintf(textArea1Buffer, TEXTAREA1_SIZE, "%d", value);
textArea1.resizeToCurrentTextWithAlignment();
textArea1.invalidate();
}
The help says "Remember to call myTextArea.invalidate() before resizing myTextArea if you are decreasing the text area size. If not, you will still see part of the old text area, since it is not covered by the new smaller text area.", but the code sample is the other way round. Either way it still displays garbage.
2020-07-16 11:18 PM
Hello
This could happen when you didn`t specify Wildcard characters/ranges in Text/Typographies window in designer. Missing characters replaced by ? by default
2020-07-17 01:22 AM
@AB1.1 is right. Which glyphs were you expecting instead of ? Check your wildcard range and whether or not it covers those unicodes that are displayed as ?.
/Martin
2020-07-27 08:08 AM
I see. Would it be possible to add a note about the wildcard range to https://support.touchgfx.com/docs/development/ui-development/touchgfx-engine-features/texts-and-fonts/ or a reference to https://support.touchgfx.com/docs/development/ui-development/designer-user-guide/texts-view/? Similarly a note about snprintfFloat() being needed instead for floats.
Is there any support for displaying enumerated text e.g. Dog, Cat? Is this supported, or simply wildcard range of "A-z"?
2020-07-30 08:26 AM
@Alexandre RENOUX (ST Employee) please see request above