cancel
Showing results for 
Search instead for 
Did you mean: 

Prevent double clicks on TouchGFX button

sute
Associate III

I have a TouchGFX project with some buttons used for navigating a menu. The problem is that for some reason every couple of touches is registered as a double click. So I click the touch button once, but the virtual function called by the click event is called twice. Any way to decrease the sensitivity?

I can do this in the source code, but wondering if there is a way directly in TouchGFX designer.

1 ACCEPTED SOLUTION

Accepted Solutions
Yoann KLEIN
ST Employee

Hello @MS.12utela​,

Actually, when you click a button in TouchGFX, it does not register a double-click event, but it triggers a handler with a pressed event parameter when you press the button, and when you release your finger from the button, it passes a released event to the handler.

You can get inspiration on how to decouple those 2 events from this post.

Hope that helps,

/Yoann

Yoann KLEIN
ST Software Developer | TouchGFX

View solution in original post

2 REPLIES 2
Yoann KLEIN
ST Employee

Hello @MS.12utela​,

Actually, when you click a button in TouchGFX, it does not register a double-click event, but it triggers a handler with a pressed event parameter when you press the button, and when you release your finger from the button, it passes a released event to the handler.

You can get inspiration on how to decouple those 2 events from this post.

Hope that helps,

/Yoann

Yoann KLEIN
ST Software Developer | TouchGFX
sute
Associate III

Thanks! This will help