Skip to main content
MA.21
Associate III
Nov 10, 2022 7:28 AM UTC
Question

next lin in textarea

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
Nov 10, 2022 8:48 AM UTC

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
Nov 10, 2022 4:00 PM UTC

thanks i undestand

Osman SOYKURT
ST Technical Moderator
Nov 14, 2022 9:11 AM UTC

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
Nov 14, 2022 9:12 AM UTC

how i do i dont see any icon