Subject Re: OnClick?
From Mervyn Bick <invalid@invalid.invalid>
Date Sun, 27 Jun 2021 13:42:36 +0200
Newsgroups dbase.getting-started

On 2021/06/20 23:40, Bruce Beacham wrote:
>> If one TABs to a pushbutton pressing the Enter key is the same as
>> clicking on the pushbutton.
>
> Because of CUAENTER I prefer to trigger a pushbutton with the space key
> rather than the Enter key.

The onClick event of a pushbutton that has focus is triggered from the
keyboard by either the Enter key or the Space bar.

A standard pushbutton triggers its onClick event if the user presses
either the Enter key or the Spacebar while the pushbutton has focus.

With CUAENTER set OFF the Enter key acts as a TAB and it is very easy to
trigger the onClick of the wrong pushbutton if there is more than one
pushbutton on the form.

I've placed a custom pushbutton that does not react to the Enter key in
the shared-code newsgroup.  To trigger the onClick event the user either
needs to left-click on the pushbutton or press the Spacebar.

Mervyn.