Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Default Button Status shifts to the button clicked
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01154360
Message ID:
01154361
Views:
9
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform