what's the TAB Order you have (also you may want to set the buttons TABSTOP
to .f.)
Arnon
>
>>>>Command buttons have a property called Default. Of course, setting this
property to .T. tells the system to execute the click event of a command
button when Enter is depressed by the user. Right now I am building a
simple form, with no pageframes, just data entry fields and command buttons.
For some reason the Default property for all my command buttons are set to
.T. at run time. So if the user were to hit the Enter to key to get from
field to field, instead of the tab key, the code behind my first command
button is executed. I need some help to solve this problem. I have tried
several things, but even if I set the Default property to .F. at run time,
just moving the mouse sets it back to .T. Thanks for any input.
>>>
>>>Are you saying that the cmdButton.Click() fires if a user presses the
*Enter* key in a text box???? The click() method will always fire in a
command button if the *Enter* key is pressed when that button has focus.
This is default behaviour that can only be aborted if that key code is
tested for with code.
>>
>>Yes, I am saying that the cmdButton.Click() method fires when the user
presses the Enter key in a textbox. Have any input? Thanks.
>
>I can thankfully say that I have never experienced this problem (VFP5.0a).
The only things I know that can fire a command button click method is if a
user clicks the button, presses ENTER while the button has focus, or in some
other method of a text box, form refresh, etc., there is some code that
fires the command button click method. After reading up on *set keycomp* in
the VFP help, it would not seem to be a problem with that parameter if
cmdButton.Default = .f. with KeyComp set to "Windows".
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only