2019-05-14 12:19 AM
Hello,
I am fairly new to the TouchGFX designer and am trying to build an application where I can copy the contents typed using the keyboard on a screen(Custom Keyboard application provided with the designer) to a TextArea on another screen. I would really appreciate any help regarding this problem.
I am using a STM32F746G-DISCO Board.
Thanks in advance.
2019-05-14 12:26 AM
Hi @Shirish,
Could you try checking out the keyboard example we have in the list of UI templates in the designer and then get back to me? Thanks
/Martin
2019-05-14 12:31 AM
Hi @Martin KJELDSEN ,
Thank you for the quick response.
In my project I have used the keyboard example that has been provided in the templates. But I am experiencing some trouble trying to copy the contents typed through that keyboard to another screen that i added. the new screen had a textarea with a wildcard. and I wish to copy the typed numbers/text to this TextArea on the new screen.
Thanks.
2019-05-14 12:59 AM
You can use Unicode::strncpy() from the Unicode class we provide to copy from one buffer to another.
2019-05-17 01:18 AM
Hi @Martin KJELDSEN ,
I tried the solution you suggested. I managed to copy keyboard buffer to the text area buffer on the same screen. Unfortunately, the function is copying only one character to the textArea. It does not display the rest of the content only the FIRST number that is typed through the keyboard.
I also have been trying to copy the text to a different screen containing a textArea. But this fails. Could you please help me out again?
Thanks.
-Shirish
2019-05-20 12:03 AM
I think you may have to provide me with a project, Shirish.
Thanks!
2019-05-20 05:49 AM
Hi @Martin KJELDSEN ,
Sure. could you please check your messages, I have shared a link to the project.
Thank you.
-Shirish
2019-05-20 06:22 AM
I've received it, thanks. Will check as soon as i can.
2019-05-20 06:31 AM
Without trying your project yet, i just did a test where i have two TextAreas with wildcards. I copy the content of one to the other with the following code and that works fine.
Unicode::strncpy(textArea2Buffer, textArea1Buffer, 10);
textArea2.invalidate();
Can you maybe check the output buffer you get from the Keyboard? Debug and look at the contents and see if it's what you expect.
2019-05-20 11:37 PM
@Martin KJELDSEN
It does work if the TextAreas are on the same screen. and in my project I need to copy the keyboard buffer to the textarea buffer on any other screen other than the keyboard screen itself. In addition, the textarea with wildcard needs as many initial values as I would type on the keyboard eg. 000000 for 123456 number on keyboard. eg. if i want to type 12345 on the keyboard but have only 0000 initial value in the textarea with wildcard, it prints 1234 and skips 5. I hope I am explaining the problem properly and it is easy to understand.