Skip to main content
MA.21
Associate III
November 10, 2022
Question

next lin in textarea

  • November 10, 2022
  • 4 replies
  • 966 views

hi,i have a 3 data in a array like uint_8 pda[3] ={1,2,3);

i want to print each on next line

so how i can put next line character in textarea

This topic has been closed for replies.

4 replies

Osman SOYKURT
ST Technical Moderator
November 10, 2022

Hello MA.2,

I think something like this should work :

 uint8_t pda[3] = {1,2,3};
 for (int i = 0 ; i<3 ; i++)
 {
 Unicode::snprintf(textArea1Buffer, TEXTAREA1_SIZE, "%s%d\n", textArea1Buffer, pda[i]);
 textArea1.invalidate();
 }

0693W00000WHymRQAT.pngThe idea is to rewrite in the same buffer each time you enter the loop, adding a new value of your array and a backspace. Don't forget to check "Use wildcard buffer" for your textArea and set the wildcard range :)

0693W00000WHynoQAD.png0693W00000WHyoDQAT.png 

/Osman

ST Software Developer | TouchGFX
MA.21
MA.21Author
Associate III
November 10, 2022

thanks i undestand

Osman SOYKURT
ST Technical Moderator
November 14, 2022

You're welcome :)

Can you select the best answer and close this thread? That would help other people looking for a solution to a same problem.

/Osman

ST Software Developer | TouchGFX
MA.21
MA.21Author
Associate III
November 14, 2022

how i do i dont see any icon