Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
.SETFOCUS
Message
 
À
05/11/1998 22:49:54
Ian Matthews
Up & Running Technologies Inc
Chestermere, Alberta, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00155099
Message ID:
00155105
Vues:
23
>After a simple test fails on a form, I want the focus to stay on the field/control it is currently on. So I thought I would use:
>
>thisform.xxxxx.setfocus
>
>which seems to work fine in some instances and not in others. Specifically, if that code is used in the LOSTFOCUS event it is ignored.
>
>The control is visible and active.
>
>Originally I had the code in the VALID event but VFP informs me that .SETFOCUS can not be used in VALID.
>
>I can only get .SETFOCUS to function as I expect from buttons.
>
>Ideas???

Ian, you can still have your validation code in Valid and not use Setfocus at all. If your test fails just RETURN 0 from Valid().

Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform