cancel
Showing results for 
Search instead for 
Did you mean: 

next lin in textarea

MA.21
Associate III

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

4 REPLIES 4
Osman SOYKURT
ST Employee

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

Osman SOYKURT
ST Software Developer | TouchGFX
MA.21
Associate III

thanks i undestand

Osman SOYKURT
ST Employee

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

Osman SOYKURT
ST Software Developer | TouchGFX
MA.21
Associate III

how i do i dont see any icon