2019-04-18 04:14 AM
i have this problem, in my app i have a text area which say:
current option:
Option A
using touchGFX i set an interaction when a button is pressed to chage that text area, and i need it to become:
current option:
Option B
when i put those tho line in the text field in the Interaction options on touchGFX like showed
what TouchGFX generates on ScreenViewBase.cpp is this:
and OFC won't compile.
i tryed some escape sequence, but no luck so far...
can someone enlight me.
Thanks in advance
Stefano
Solved! Go to Solution.
2019-05-03 05:03 AM
Hi @Zui,
Have you considered texts with wildcards? Using wildcard unicode buffers you can replace the text of a textarea runtime.
Step 3 of this tutorial explains how to do that using the designer:
https://touchgfx.zendesk.com/hc/en-us/articles/205587571-Step-3-Adding-Text
2019-04-18 04:18 AM
What escape sequences did you try? If not \n or \r\n then try them too.
2019-04-18 04:47 AM
tryed \n, \n\r ,\\n, \0x0A, and whith / instead of \
2019-04-18 05:09 AM
So what exactly happens with \n for example? I'd think that the generated comment breaking with syntax error should be fixed.
2019-04-18 05:23 AM
i fix temporaly with a work-around by creating a resource with the phrases i need, in this case works fine because i need few different fixed phrases, but problem persists if i need to change text with something user type, or still something not hard coded
2019-04-18 08:02 AM
well, with \n there are no errors, but che textArea shown is
current option:\n option B
instead of
current option:
option B
2019-05-03 05:03 AM
Hi @Zui,
Have you considered texts with wildcards? Using wildcard unicode buffers you can replace the text of a textarea runtime.
Step 3 of this tutorial explains how to do that using the designer:
https://touchgfx.zendesk.com/hc/en-us/articles/205587571-Step-3-Adding-Text
2019-07-15 07:18 AM
That tutorial article is nice and all, but it doesn't show how to add newlines to a text area from code.
Does snprintf support printing newlines to a wild card buffer? I think not (I've tried)