A while ago I posted about creating custom buttons and was pointed to this. While it has worked perfectly so far and with the addition of the following code to its mouseReleased function:
Code: Select all
wxCommandEvent evt(wxEVT_COMMAND_BUTTON_CLICKED, GetId());
evt.SetEventObject(this);
HandleWindowEvent(evt);
I tried putting it in mouseDown, which changes it so the buttons are instantly clicked, but this causes a sizeable delay in pressing the same button multiple times if the mouse does not move at all. It also causes some other slightly undesired functionality as the user cannot hold the click and move their cursor off it to cancel.
Is there a way to make it so it the button won't be activated by clicking on another control? If not, as the intended device has a resistive touch screen, I can have the code in the mouseDown function.