cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX - read displayed value and operate in dependency of it

Alx237
Visitor

Hello all, 

I am really new to TouchGFX and can't find a solution to my problem. 

I want to increase or decrease a displayed value on my screen by clicking on a button. 

I think I have to read the value each time by using getWildcard(). But now I have a data type conflict as I can't just handle it as an int and increase it. In the following you can see a picture of my screen. 

Thank you in advance :) 

Alx237_0-1750768277539.png

 

2 REPLIES 2
jumman_JHINGA
Senior III

Hii @Alx237 

if you using Text Area for increasing and decreasing the values.

1. Enable Wild Card buffer for your text area.

2. you have take one static variable ... based on UP & DOWN button you have to increase or decraese the value of static variable.

3. using  Unicode::snprintf(taBuffer, TA_SIZE, "%d ", variable); you can update value on screen.

4. after every update you need to call ta.invalidate(); 

GaetanGodart
ST Employee

Hello @Alx237 and welcome to the community!

 

You have to store your data as an int, increment or decrement that int and then display it.

Have a look at the TouchGFX Academy where we provide tutorials and video guides.

Please find attached an example of incrementing and decrementing value.

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)