Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SetFocus
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00068704
Message ID:
00068746
Vues:
49
>>I'm trying to set the focus to a textbox on my form and have tried using the setfocus method. I'm obviously using it wrong since it's not working. I've looked in help for an example and have come up with nothing. Can someone give me an example on how this works.
>>
>>Mark A. Struck
>
>Usually thisform.mytextbox.SetFocus() works. :)

And if it doesn't then something else is overwriting it, Mark :-)

Do you get an error message or just another control gets focus? Do you have other code in your Init or Activate methods that call a SetFocus() for another control? Or do you have a control that has been updated with a calculated value as part of the Activate or Refresh methods?

Finally, if you're setting the focus from another control then the LostFocus code of that control may be causing a problem. You should call a NODEFAULT before your Thisform.NewControl.SetFocus() call, so the original control won't follow through to the next tab-stop.

HTH
Barbara
Barbara Paltiel, Paltiel Inc.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform