cancel
Showing results for 
Search instead for 
Did you mean: 

Changing text at runtime in custom container - Language issues

AndreaC
Associate III

Hello,

Description

I have created a custom container to have the same stuff displayed at top of the screen, whatever the active screen is.

In this custom container there's a text area tVersFw (with a wildcard and a wildcard buffer) which has to show a const string. I can't precompile the string in Designer beacuse the strings changes with firmware version (chosen at compile time by setting a preprocessor macro).

So, in the initialize() call of the custom container I added this code:

 

 

Unicode::strncpy(tVersFwBuffer, FW_VER_STRING, TVERSFW_SIZE);
tVersFw.invalidate();

 

 

where FW_VER_STRING is like "ABC123".

 

Issue

When I change GUI language, at runtime, one of the two languages makes the textarea show weird things.

It's systematic: when I select one language, "ABC123" is correctly displayed whikle when I choose the other I see something like "New TextABC123".

 

What am I doing wrong?

 

Thank you in advance,

Andrea

1 ACCEPTED SOLUTION

Accepted Solutions
JTP1
Lead

Hello

At Tgfx designer, open 'texts' and check all autogenerated items. There is probably some 'New Text <value>' items in language column which is not working. Remove 'New Text' and leave <value>, it represents the wildcard buffer content. By default, this New Text is added to all languages.

Hope this helps.

Br JTP

View solution in original post

2 REPLIES 2
JTP1
Lead

Hello

At Tgfx designer, open 'texts' and check all autogenerated items. There is probably some 'New Text <value>' items in language column which is not working. Remove 'New Text' and leave <value>, it represents the wildcard buffer content. By default, this New Text is added to all languages.

Hope this helps.

Br JTP

That's it!

Thank you very much,
Andrea