UP True DRAG False

I know that by answering True at the MouseDown event I fire the MouseUp and MouseDrag events.
First of all I assume that MouseUp is first and then it starts a fast repetition of the MoseDrag event. Hopefully this is this way and never will change, although with events one never knows…

I need to use (fire) the UP event but not the DRAG event.
What I did was to create a flag at the end of the UP event, whose value changes according the program.
The DRAG event fires or not depending on this value.

My question is: how do yo do it or how would you do it if you were in this situation?
Thanks in advance for your suggestions.

I think you’ve got that a little backwards. The sequence of events will be:

MouseDown (return true)
MouseDrag (multiple)
MouseUp

No. Drag only happens while the mouse button is down. MouseDown starts the firing of Drag Events.

Mouse up marks the end of a possible drag.

While the mouse is down you determine if you are dragging … Usually by if the the mouse cursor has moved a certain amount.

Then In Mouse up know if you have enabled the drag and if not do something else.

-Karen
-Karen

1 Like

Fun tip: You can use a Point object to quickly calculate the distance between points and make that determination!