Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to SetFocus from within a Valid()
Message
 
À
30/07/2004 16:32:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00929751
Message ID:
00929772
Vues:
9
Steve and Jay,
Thanks to both of you for the help.
NoDefault in the LostFocus made no difference but thanks anyway.

I returned a 1 or 2 from the Valid() depending on the button I wanted and it worked. I agree that if I had a more complex form it could cause problems as soon as you made any changes but for this simple form it was exacty what I needed.
John.

>John,
>
>In valid, you can return a number...postive or negative...to move focus forward or backward that number of controls. May not be good design, though... :)
>
>>(Using VFP 8)
>>OK,I know you can't but here is the problem. I have a sign-in form with one user input text box where they enter a password to sign in/out. I have a valid in the text box to find and display the user name and status. I have two buttons: Sign In & Sign Out. Depending on their status I need to set focus to the proper button. I need both buttons in case they forgot to sign in /out the last time and have to select the other button. I can't set focus from within the valid of the text box. I tried putting it in the LostFocus() but it causes the Valid() to fire again. I know I'm missing something here.
>>TIA
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform