Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
I want to stay on a field?
Message
 
À
19/09/1997 22:18:31
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00049609
Message ID:
00050907
Vues:
43
Dragan,

You would need to handle that in the LostFocus() of the current control. In some fashion you need to know what key was pressed to exit the control, this could be accomplished in the control's keypress event. Add a property to the control named ExitKeyCode and in the keypress;

IF nKeyCode = {BackTab} OR ...
THIS.ExitKeyCode = nKeyCode
ENDIF

Then in the Valid;

IF THIS.ExitKeyCode =
RETURN .T.
ENDIF

In the LostFocus you can also look at ExitKeyCode to find out what to do.

You still need to validate the data when they hit the save button because they could;

1) put in bad data
2) backtab to the previous control
3) click the save button

If this is true then why are we validating at all in the control?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform