How can I prevent the Action event of a push button event from being called when the user presses the enter key? I have tried changing the focus to a text field, but the enter key always seems to be linked to a push button.
Turn off the “Default” property for the pushbutton.
Thanks!
and you have to turn off all pushbuttons! The next one is already waiting for the return
So drag out what Xojo calls “generic buttons”, not “default buttons”.
If you place all “Default Buttons”, you will see the issue that you’re running into. The default button always get the Enter keypress before anything else on a page. However, there should only ever be one “Default” button on a window. As Gavin says, please use “Generic Button” for your buttons unless you absolutely need a “Default” button.