0

Working with wxWidgets on W7, with focus over a wxButton, I would like to avoid button activation pressing SPACE or ENTER keys.

The button should reacts only on click events.

What is the right way to do it?

Thanks

1 Answer 1

2

You should be able to do this by catching EVT_KEY_DOWN event and doing nothing in your handler, but I'd strongly recommend not doing this. Users expect these keys to work with the buttons and if you want something that doesn't react to the keyboard, you should use some other (custom) control and not wxButton at all.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.