Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cannot setfocus from valid
Message
 
À
14/02/2002 13:37:35
James Blackburn
Qualty Design Systems, Inc.
Kuna, Idaho, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00620209
Message ID:
00620237
Vues:
17
James,

I know the exact problem you're describing. And as Nadya points out, it is by design. However, there is a work around: basically you have to instantiate a timer and immediately disable it. Then, you set a property on that timer telling it what to do, and then you enable the timer. In the timer's Timer event, the first line needs to disable it again. Then, it needs to perform some action based upon the current value of that property. Make sure the interval is set high enough to allow time for the program to finish executing the valid event.

HTH,

Travis

>Hi All
>
>I have just run into an issue that I was sure I have done in the past. I am building a class that will check if the value of a textbox is valid based on a parent table. If the value is not valid then I want to pull up a search form for the user to pick from. This form has a setfocus in it to get the user to the appropriate place. If place the code in the valid method I get the error. If I use the lostfocus then the valid has already fired. I guess I could call getfocus from within lostfocus but that seems wrong to me. Any ideas?
Travis Vandersypen
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform