cancel
Showing results for 
Search instead for 
Did you mean: 

Wildcard text works perfectly in TouchGFX simulator but not when flashed to board!

BTKottary27
Associate II

I’m working on a TouchGFX project with a dropdown menu. When I select an option, the selected text is shown in a TextArea using a wildcard buffer (selectedTextBuffer).

In the TouchGFX Simulator, the full string displays correctly. But on the actual STM32 board, only the first letter (e.g., just "M") is visible.

I've already tried the following:

  • Set the buffer size in Designer to 32

  • Confirmed that all characters are included in the font's wildcard character set

  • Verified that invalidate() is called after updating text

  • Rebuilt assets and fully flashed the board

Despite all this, the board still only shows the first letter.

Setup:

  • MCU: STM32H7 (STM32H750-DK)

  • TouchGFX version: 4.25.0

  • TextArea uses selectedTextBuffer as wildcard

6 REPLIES 6
LouisB
ST Employee

Hello @BTKottary27,

Your text area is big enough to show all the characters ? Try to call resizeToCurrentText() TextArea | TouchGFX Documentation.

BR,

Louis BOUDO
ST Software Engineer | TouchGFX

tried resizeToCurrentText() , No changes. It works perfectly fine for me in simulator but not on board!

LouisB
ST Employee

Hello @BTKottary27 

You can try to debug the target, check what value is passed to the textArea and if the invalidation is made correctly.

BR,

Louis BOUDO
ST Software Engineer | TouchGFX

Were you able to resolve this?

If you changed the text displayed to something else, "Test", does it always show only the first letter? If you add more M's (keep them capitalized), will it display them? Are you using Typed text or creating the text programmatically with snprintf? If you don't use a wildcard but simply place text in there will it display correctly?

If you changed the text displayed to something else, "Test", does it always show only the first letter? 

Yes

If you add more M's (keep them capitalized), will it display them?

No, only first letter

Are you using Typed text or creating the text programmatically with snprintf? 

creating using snprintf

If you don't use a wildcard but simply place text in there will it display correctly?

Yes It does.

 

Anyways I used the textID of the buttons in the dropdown menu to set to my desired wildcard text. It worked for me. 

Thanks!

 

Great! That's probably the better way to go as it supports localization (different languages, formatting).