Skip to main content
A.Qasim
Associate II
June 14, 2022
Question

Add up two or more texts and show them into 1 Textarea

  • June 14, 2022
  • 10 replies
  • 4614 views

Greetings,

I am trying to add up texts from different scroll lists and show up in one textArea as a concatenated string as image shown below :-

0693W00000NroScQAJ.bmpI have tried converting the typed text to Unicode::UnicodeChar and then applying Unicode::strncpy but it completely replaces the text.

This topic has been closed for replies.

10 replies

Andrew Neil
Super User
June 14, 2022

You need to show what you've actually done in order for people to be able to comment on why it might not be working.

For strncpy, you would need to be sure that you make the copy destination the NUL termination of the other string...

0693W000008wfhEQAQ.png 

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
A.Qasim
A.QasimAuthor
Associate II
June 14, 2022

thanks for your reply I'll shortly upload the project

Andrew Neil
Super User
June 14, 2022

The other question would be when TouchGFX evaluates the length of the string: could it be that it evaluates it before you do the concatenation, and then only uses that length of the string - so never sees your update ... ?

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.