2020-01-20 10:56 PM
Hi everyone,
I am trying design a custom container that needs to "handleDragEvent" function. But this function cannot be overridden in a container, as far as I see. This function can be usable when you work in a screen. But when you work in a custom container it's not working.
I tried create a function for drag event in custom container and call this function in a screen's "handleDragEvent" function. Like that;
void testScreenView::handleDragEvent(const touchgfx::DragEvent& evt)
{
if(customContainer.isVisible()) {
customContainer.customDragEvent(evt);
}
}
When I do that custom container drag event works very well. But this time screen's scrollable containers not working properly.
What should I do? Anybody have any idea? Thanks in advance.
Solved! Go to Solution.
2020-01-21 02:53 AM
What you're doing is effectively "stealing" the event from the rest of the components in the view, by only telling your custom container about it.
In the start of your handler, try this to propagate the event:
View::handleClickEvent(evt);
/Martin
2020-01-21 02:53 AM
What you're doing is effectively "stealing" the event from the rest of the components in the view, by only telling your custom container about it.
In the start of your handler, try this to propagate the event:
View::handleClickEvent(evt);
/Martin
2020-01-30 12:47 AM
Only now I could find time to try this. Its work properly. Thank You for advice. =)
Just one correction;
View::handleDragEvent(evt);
I think you wrote "Click" instead "Drag". :)
2020-01-30 02:06 AM
Woops, glad you caught that :D