Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Default Button Status shifts to the button clicked
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01154360
Message ID:
01154361
Vues:
10
This message has been marked as the solution to the initial question of the thread.
>Hi all
>
>In my mover class I have 3 buttons, Add, Remove and Ok. The Ok button is the default button. After selecting a record when the Add buttons is clicked the Default button status is shifted to the Add button.
>
>How can I avoid this behaviour, except for force coding?
>
>UPDATE: Actually I am wanting the Ok button to work only for Ctrl+Enter rather than a simple Enter, is this possible.

No if you set it to be Default. But you could set Default = .f. for that button and Set KeyPreview = .t. for form and in KeyPress Event of the form put:
LPARAMETERS nKeyCode, nShiftAltCtrl
IF nKeyCode == 13 AND nShiftAltCtrl == 2 
   NODEFAULT
   thisform.ButtonNameHere.Click()
ENDIF
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform