‎2020-02-06 02:18 AM
hello people..
actually i want to display a string..
i did in this way
char buff[10]="hello";
Unicode::snprintf(buffer,10,"%s",buff);
but am not getting anything.....
in the prinf the buffer is i had the textarea from touchgfx that buffer am taking here...
can you sortout my issue
thank you...
‎2020-02-06 04:04 AM
‎2020-02-06 05:20 AM
I just ran into this issue the other day.
If you want to take a character array like you have and stuff it into a TouchGFX text buffer you need to do a couple things.
Also, this page is your best friend. It contains a wealth of information on this topic: https://touchgfx.zendesk.com/hc/en-us/articles/207015345-Using-texts-and-fonts?mobile_site=true
‎2020-02-06 05:24 AM
Thank you jimmi.....
but i have seen this article ...but my way of doing it is ...i had a text with blank and wildcard of size 10 in touchgfx.
In the model i have defined int i2c=100;
and am printing it in view....using Unicode::snprinf(TexareaBuffer,10,"%d",i2c);
this is working fine, but in the place of int variable i2c=100, i want to declare a buffer like this.............................. char buff[10]="hello";
this i want to display in view..
i did like this
Unicode::snprinf(TexareaBuffer,10"%s",buff);
but it is displaying question mark(?)
if i do directly Unicode::snprinf(TexareaBuffer,10"%s","hello");
the same issue...
so that is why i asked about how to print a string only string not integer..
and in touchgfx i written Wildcard char is 0-F and wildcard range 0-9..still same issue..
please help me to fix this issue....
‎2020-02-06 06:26 AM
it is working now,,,,,, but when i want to leave initially my wildcard is empty in that case it is not working...
i want it works in this case also...
i have filled my wild card with abcdefghij.
if i want to print "zxzx" which i haven't written in wild card then it's giving quesion marks again...i have to make it works in this case also... why because we can not write all the chacters in wild card .....please help me...
‎2020-02-06 06:34 AM
it is working now,,,,,, but when i want to leave initially my wildcard is empty in that case it is not working...
i want it works in this case also...
i have filled my wild card with abcdefghij.
if i want to print "zxzx" which i haven't written in wild card then it's giving quesion marks again...i have to make it works in this case also... why because we can not write all the chacters in wild card .....please help me...
Like
Reply
Select as Best
‎2020-02-06 06:34 AM
I recommend adding the entire ASCII character set to your wildcard range for the font that you are using. This will allow you to leave your TextArea blank.
In your Wildcard Ranges field enter the values: 0x20-0x7e
‎2020-02-06 06:40 AM
i was trying by writting A-F in wildcard character under typoghrapies under texts in touchgfx but if i write "AvgdbdvZ" in my buffer...
it is displaying "A??????F" it is treating it as A and - and F but it should take all characters ...what is the issue in this case
char buff[20] = "AvgdbdvZ";
Unicode::strncpy(textArea1Buffer, buff,20);
textArea1.invalidate();
textArea1.setWildcard(textArea1Buffer);
textArea1.resizeToCurrentText();
textArea1.invalidate();
i have written code like this....
‎2020-02-06 06:46 AM
This is the code that I have that works:
char string[20]="AvgdbdvZ";
touchgfx::Unicode::UnicodeChar dst[20];
Unicode::strncpy(dst, string, 20);
Unicode::snprintf(testOutputTextAreaBuffer, TESTOUTPUTTEXTAREA_SIZE, "%s", testOutputTextAreaBuffer, dst);
testOutputTextArea.invalidate();
‎2020-02-06 06:53 AM
sry:) dear JHard it is working fine now...issue fixed
thank you very much....