Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Default property for Command Buttons
Message
From
24/06/1998 02:54:45
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00110870
Message ID:
00111143
Views:
20
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
Map
View

Click here to load this message in the networking platform