Skip to main content
jhasa.2
Associate III
September 19, 2022
Question

interaction in button in touchgfx not work

  • September 19, 2022
  • 21 replies
  • 5263 views

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?

This topic has been closed for replies.

21 replies

Yoann KLEIN
ST Employee
September 19, 2022

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 KLEINST Software Developer | TouchGFX
jhasa.2
jhasa.2Author
Associate III
September 19, 2022

0693W00000SvgCjQAJ.png

jhasa.2
jhasa.2Author
Associate III
September 19, 2022

@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
September 19, 2022

Hello,

Can you please share your project ?

/Yoann

Yoann KLEINST Software Developer | TouchGFX
jhasa.2
jhasa.2Author
Associate III
September 19, 2022

surely

it is attached!

jhasa.2
jhasa.2Author
Associate III
September 19, 2022

@Yoann KLEIN​ 

MM..1
Super User
September 19, 2022

Are you sure , your touch panel work?

jhasa.2
jhasa.2Author
Associate III
September 20, 2022

yes I can send the video if you want.

Yoann KLEIN
ST Employee
September 20, 2022

Hello @Community member​ ,

Which display are you using ?

If it is the X-CUBE-DISPLAY, there is no touch sensor implemented in it.

/Yoann

Yoann KLEINST Software Developer | TouchGFX
jhasa.2
jhasa.2Author
Associate III
September 20, 2022

no I use touchscreen FT5316

touch is ok but the interaction not works.

why?

@Yoann KLEIN​ 

Yoann KLEIN
ST Employee
September 21, 2022

Then the issue comes from the driver of your touchscreen and/or the hardware configuration.

You will have to debug it or find examples/tutorials online.

A good starting point would be to put a breakpoint in your STM32TouchController::sampleTouch(int32_t& x, int32_t& y) method, to see if every time you click, this function is triggered with the right coordinates.

/Yoann

Yoann KLEINST Software Developer | TouchGFX