2026-02-04 2:44 AM
I’m a beginner with TouchGFX, and I’m wondering whether it’s possible to make touch input behave the same way it does on mobile smartphones. Specifically, before a drag event is detected, the finger must move a certain number of pixels.
What I’d like is this: when a press event is first detected, you check whether the user has moved their finger at least 10 pixels, and only then do you start moving the screen. However, once that threshold is reached, the screen should move starting from 1 pixel. When the user releases their finger, a release event occurs and everything is reset, so that after the next press event, the finger must again move 10 pixels before a drag event can occur.
Is it possible to implement this behavior?
I tried using setDragThreshold, but then the entire screen scrolls by the number of pixels specified as the threshold. Is it possible to change setDragThreshold dynamically in the view?