cancel
Showing results for 
Search instead for 
Did you mean: 

Text area sometimes contains question marks

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.

4 REPLIES 4
AB1.1
Associate II

Hello

This could happen when you didn`t specify Wildcard characters/ranges in Text/Typographies window in designer. Missing characters replaced by ? by default

Martin KJELDSEN
Chief III

@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

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"?

 @Alexandre RENOUX (ST Employee) please see request above