There is nothing abnormal about these gestures. A click is a mouse press and release, it cannot be without both actions.
You don't want to mess with timers, just set a var to true on a mouse down and reset it to false on mouse up and click. if that var is true on the mouse move then start drag. you can keep select on click, and perhaps you need to do something on the start drag like select. All these gestures work as expected. > 1. click Fires the CLICK > 2. double-click Fires the DOUBLE_CLICK event > 3. press and hold (move is optional) press is the MOUSE_DOWN event, hold isn't an event, it's the lack of event. > 4. release Fires the MOUSE_UP event try the above strategy and I think you'll find it's what you are expecting. Paul --- In [email protected], "Engkee Kwang" <[EMAIL PROTECTED]> wrote: > > Paul, > > Your explanation is correct in why I'm not getting the behavior I > want. In a way, what I'm looking for is "logical" mouse event > behavior that more closely corresponds to what I would consider to > be "normal" user gestures and expectations, namely, the following.... > > 1. click > 2. double-click > 3. press and hold (move is optional) > 4. release > > Those are the gestures that users learn when using the mouse. Seems > like those would be desirable events to be able to map to directly > and not have to do code like... catch mouse down... fire off timer... > if timer expires before mouse-up, it's a click... otherwise, we are > pressing-and-holding... so start a drag... > > -Engkee > > > > --- In [email protected], "Paul DeCoursey" <paul@> wrote: > > > > Click isn't going to happen until after mouse up, and if you start a > > drag I'd think that would supress any click events. I'm thinking > you > > will just want to do the select on the mouse down. Then trigger the > > drag on mouse_move if no mouse_up or Mouse_click has occurred. > > --- In [email protected], "Engkee Kwang" <ekwang@> wrote: > > > > > > what is the trick to listen for and handle both MOUSE_CLICK (say > to > > > select) and MOUSE_DOWN (to start dragging)? > > > > > > I have a Label on a canvas. First I added a listener on > MOUSE_CLICK and > > > that works. My handler gets called and I can "select" the item. > > > > > > Then to support D&D, I added another listener on MOUSE_DOWN. When > I do > > > that, I get call on mouse-down and I can then initiate the drag. > > > Unfortunately, I no longer get called on click. > > > > > > Presumably, rather than listening for MOUSE_DOWN, what I really > need to > > > do is listen for the mouse-down but without any mouse-up for some > > > interval... so as to distinguish it from a click. Is there such > an > > > event? > > > > > > -Engkee > > > > > >

