Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
KeyPreview and Valid, can anybody help me in this.
Message
De
29/03/1999 21:44:28
 
 
À
27/03/1999 10:56:12
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00202720
Message ID:
00203267
Vues:
20
Since control never really leaves the control when Ctrl+S is pressed, the valid event will not fire first.

I recommend setting up a form-level validation method that is called when a save is requested. The validation routine will check all fields, possibly based on a property in the hosting control(s). If a field is invalid, focus is set to the control and the Save is denied.

Another advantage of this is that users can freely move through all fields for heads-down processing before having to stop to correct some data. You can still have individual controls call the validation method, if desired.

If this approach does not work for you, try executing the control's valid event as follows:

thisform.activecontrol.valid()

Hope this helps.

Greg Willcockson
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform