Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Default property for Command Buttons
Message
De
29/06/1998 07:24:56
Daniel Cohen
Spawar Syscen Chesapeake
Chesapeake, Virginie, États-Unis
 
 
À
24/06/1998 17:59:20
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00110870
Message ID:
00112440
Vues:
13
>>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.
>
>I've had stumbled upon this at the very beginning, and this issue had me going up and down my soapbox over the famous Guidelines for creating a GUI etc etc, and finally concluded that we're doing data ENTry, and not data TABby, so here's what I have in my textbox (and few other) classes' KeyPress event:
>[snip]
> case nKeycode=13
> clea type
> keyb '{tab}' plain
> nodefault
>[snip]
>Works happily ever after - and I've almost forgotten the problem. HTH
>
>
> Thank you very much!! I will put your your code into practice today. Have a good day.
Daniel M. Cohen
Computer Analyst
SPAWAR System Center Chesapeake

email: dcohen@scn.spawar.navy.mil
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform