Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Set focus without using setfocus()
Message
De
28/02/2004 18:07:25
Walter Meester
HoogkarspelPays-Bas
 
 
À
26/02/2004 19:01:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00881299
Message ID:
00881825
Vues:
44
Hi david,

I typically I avoid calling any forms opun a valid or when. For instances where I could not avoid the problem entirely I defer the setfocus by using a programmable timer which will execute the setfocus command after the regular code has finished (and cleared the valid and when events in the callstack) and VFP is processing events (timer event)

Walter,



>Setfocus() is not allowed to be called from a valid event of a textbox, editbox or spinner (there may be others, I don't know of). Not only that but setfocus() cannot be called if the valid event is anywhere in the call stack! I understand that doing a setocus within the same form or formset should not be allowed, but this is going too far!
>
>So, it's often the case in our system that a form is required to validate a users input. For example a form with an optionbuttons. If that form does a setfocus() anywhere then we get the usual error. So how on earth can I call a setfocus() (or do the programmatic equivalent) in a form that is separate to the form on which the valid() event is running??
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform