cancel
Showing results for 
Search instead for 
Did you mean: 

What causes the touchgfx framework to generate a button cancel event?

TJone
Associate

We have incorporated a new touchscreen into our product and the button press and release events seem to be generated at the correct times. If I hold my finger on the button I receive a number of cancel events in between the press and release.

I put in some debugging code and verified that my sampleTouch method is returning true and filling in the correct screen coordinates on each call while my finger remains on the button. I can't determine why the cancel events are being generated.

Any guidance you could provide would be appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Martin KJELDSEN
Chief III

Hi @TJone​,,

Missed this question. Basically, the only reason a cancel event would be generated is if your touch controller implementation returns some coordinate outside of the buttons area (e.g. You're not releasing, but simply cancelling your press). If the Touch Controller implementation would return false for some reason (no press) even if your finger was on the button, you would receive a RELEASED event.

Hope this helps a bit.

Best regards,

Martin

View solution in original post

1 REPLY 1
Martin KJELDSEN
Chief III

Hi @TJone​,,

Missed this question. Basically, the only reason a cancel event would be generated is if your touch controller implementation returns some coordinate outside of the buttons area (e.g. You're not releasing, but simply cancelling your press). If the Touch Controller implementation would return false for some reason (no press) even if your finger was on the button, you would receive a RELEASED event.

Hope this helps a bit.

Best regards,

Martin