2024-05-10 04:12 AM
Hello,
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".
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
Solved! Go to Solution.
2024-05-10 04:33 AM
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
2024-05-10 04:33 AM
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
2024-05-10 06:47 AM
That's it!
Thank you very much,
Andrea