Home > Back-end >  How to track mouse dragging?
How to track mouse dragging?

Time:08-11

What event do I need to write in my wxWidgets program so that I can track mouse dragging. I mean hold down the left mouse button and track the movement while it is pressed.

CodePudding user response:

Bind(wxEVT_MOTION, [&](wxMouseEvent& event) {
    if (event.Dragging()) {
        if (event.LeftIsDown()) {
            // code
        }
    }
});
  • Related