2022-08-23 07:59 PM
Hello all,
I create a custom container and need to used click/drag/gesture event,
but the handleClickEvent/handleDragEvent/handleGestureEvent cannot trigger in it.
How can get these event in custom container?
2022-08-23 09:55 PM
I tried to drag custom widget just by adding <Draggable> to it. And it works. I feel it should work for containers too. See https://support.touchgfx.com/4.20/docs/development/ui-development/touchgfx-engine-features/mixins#draggable
2022-08-23 10:44 PM
I want to used gesture to control a value, and your share is to drag the specified object.
2022-08-25 12:51 AM
Hi V.H,
Do you mean you want to handle click/drags with your entire container (and not just elements inside it ?)
If yes, you just need to click on your container inside your screen and check the boxes "Draggable", "ClickListener", and "Move Animator" under Mixins in the right panel (Properties).
Then you implements the functions you need when triggered. You can be helped by our article here.
/Osman
2022-08-25 05:04 AM
I was thinking the same and even sent a link to the same article, but this is not what author wants. Our idea is to drag the whole object on the screen while he needs gestures to change value inside control, but not the position of this control. Like a spin buttons besides numeric field in MFC. When you click this button and move mouse up or down this changes value in a numeric field.
2022-08-25 05:46 PM
Create a modal window and add a circle progress in it;
1, The widget can be drag when active "Draggable".
2, Generate callback function when click on the widget when active "ClickListener".
But it doesn't meet my needs. I want to used click event to active and up-down gesture event to change value for the circle progress. (The gesture range is greater than the widget range.)
So, I want to used handleClickEvent/handleDragEvent/handleGestureEvent to do it.
2023-01-09 12:06 AM
Hello @V.H , I'm trying to do the same thing on a container but handleDragEvent trigger on all the screen.
Did you succeed for that ?