cancel
Showing results for 
Search instead for 
Did you mean: 

How can we make a Box widget able to detect drag event and differentiate it from single click?

BParh.1
Senior III

I create a widget Box, with intention:

  1. For single click , do action 1
  2. For dragging, prevent doing action 1

This mean I need the Box container need to :

  1. Detect drag event. I know how to detect single click but not drag.
  2. Differentiate between drag event and single click.

I tried to tick mixins option for both 'Draggable' and 'ClickListener' then setup in class definition

virtual void handleDragEvent(const DragEvent& event) override {

    // break point here

  }

But when I drag the box, it never hit the breakpoint inside handleDragEvent().

Did I miss anything?

1 ACCEPTED SOLUTION

Accepted Solutions
BParh.1
Senior III

Ok I realize we cannot detect drag event from custom container level, it has to be propagated from Screen View level

View solution in original post

1 REPLY 1
BParh.1
Senior III

Ok I realize we cannot detect drag event from custom container level, it has to be propagated from Screen View level