How to add a click event listener to my custom control made with wxWidgets? The custom control uses wxWindow as the base. On the event list I see
wxEVT_LEFT_DOWN wxEVT_LEFT_UP wxEVT_LEFT_DCLICK wxEVT_MIDDLE_DOWN wxEVT_MIDDLE_UP wxEVT_MIDDLE_DCLICK wxEVT_RIGHT_DOWN wxEVT_RIGHT_UP wxEVT_RIGHT_DCLICK wxEVT_MOTION wxEVT_ENTER_WINDOW wxEVT_LEAVE_WINDOW wxEVT_MOUSEWHEEL
But there is no wxEVT_LEFT_CLICK or similar.
Typically, there is no ‘click’ event (and in the case of wxWidgets – there isn’t ). The action of clicking is broken into its two parts: Mouse Down and Mouse Up. Typically what you think of as a ‘left click’ event is actually handled in a ‘left up’ event.
Try it out:
This time: