2019-03-14 04:56 AM
Hello,
I am configuring ScrollWheel on touchgfx.
In order to select an option, I need to click on ScrollWheel.
In order to browse all the options, I need to drag on ScrollWheel.
So, I need both handleClickEvent() and handleDragEvent().
I also need to differentiate between a Click and a Drag action.
But, upon drag action, my program control goes in handleClickEvent() only.
It never reaches handleDragEvent() function.
Please suggest how can I detect Drag event?
Solved! Go to Solution.
2019-03-14 02:22 PM
Hi,
If you're debugging while trying to get both a click and a drag event you may run into some issues because you're releasing your mouse when you hit the first breakpoint.
The first event you'll get is a Click Event (PRESSED) then continuous drag events every tick with the delta for x and y, and then finally a Click Event (RELEASED) when releasing.
You could try printing things into the console rather than using breakpoints. You're doing it right, just overriding handleClick- and -Drag event methods.
/Martin
2019-03-14 02:22 PM
Hi,
If you're debugging while trying to get both a click and a drag event you may run into some issues because you're releasing your mouse when you hit the first breakpoint.
The first event you'll get is a Click Event (PRESSED) then continuous drag events every tick with the delta for x and y, and then finally a Click Event (RELEASED) when releasing.
You could try printing things into the console rather than using breakpoints. You're doing it right, just overriding handleClick- and -Drag event methods.
/Martin
2019-03-14 11:31 PM
Thanks for your suggesstion.
I will try and let you know
2019-04-03 01:51 AM
Any update on this?
2019-04-10 12:02 AM
Yes.. It is indeed working as per your guess.
Its kind of difficult to trace the program flow in debug mode.
I did run the program and saw the output on the console.
It is reaching drag event handler as well
Thanks a lot!
2019-04-10 12:34 AM
No problem! :)