cancel
Showing results for 
Search instead for 
Did you mean: 

interaction in button in touchgfx not work

jhasa.2
Associate III

I use stm32f767 and implement one button in screen

the reaction of the button such as change screen color or run functions not works

why?

21 REPLIES 21
Yoann KLEIN
ST Employee

Hello @Community member​ ,

Did you use interactions ?

0693W00000Svg9uQAB.pngOn the screenshot attached, you can see on the top-right corner of the screen the "Interactions" menu.

There you can select the source (button in your case) of your interaction, and the action you want to execute after the event was triggered (change screen, hide widget, ..).

If you want to do something more complex after clicking your button than one of the actions I listed above, I will have to select the "execute C++ code" option. Then, in your ScreenView.cpp, you can use API functions to do what you want.

You can take a look at this article to understand better how it works. I also advice you to read the whole documentation of TouchGFX.

Hope this helps,

/Yoann

Yoann KLEIN
ST Software Developer | TouchGFX
jhasa.2
Associate III

0693W00000SvgCjQAJ.png

jhasa.2
Associate III

@Yoann KLEIN​ 

I use interaction and in the simulator every thing is ok but on the board it doesn't work !

I am searching about 5 days and the problem hasn't solved.!

Yoann KLEIN
ST Employee

Hello,

Can you please share your project ?

/Yoann

Yoann KLEIN
ST Software Developer | TouchGFX

surely

it is attached!

I use breakpoint in Screen1View.cpp and it is not stopped at all in it.

@Yoann KLEIN​ 

MM..1
Chief II

Are you sure , your touch panel work?

yes I can send the video if you want.