Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
LostFocus problem
Message
 
À
21/10/1998 12:39:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00148958
Message ID:
00148991
Vues:
22
>Hello, Bruce
>Thank you for your reply, I already use this method ( Deactivate) but when I insert Page1.SetFocus in this method-first Page2 gets Focus and Page1 doesn't.
>
>Do you have some idea why Page1 doesn't receive Focus again. ( In fact it doesn't lose it)
>
>Thanks,
Galia,

Don't call the page's setfocus, instead assing the page number to the pageframe's activepage property. For example in the deactivate of page 2

IF EverythingIsNotAllRight
THIS.Parent.ActivePage = 2
ENDIF

To keep focus on page 2 until the data is correct. I would also give the user a messagebox to inform them of why their click is being ingored, and put focus into the control you want as in;

IF EverythingIsNotAllRight
MessageBox("You must complete page 2 before moving to another page", 0, ;
"Information")
THIS.Parent.ActivePage = 2
THIS.Text1.SetFocus()
ENDIF
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform