Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SetFocus - The BIG Question
Message
De
03/03/2005 16:07:39
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
À
03/03/2005 08:06:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
00992328
Message ID:
00992557
Vues:
23
>Its actually right that you'll also get this error if the form in question is called from When or Valid Event or in general, if When or Valid Event is in the calling stack. I tested it by calling the next form through the KEYPRESS Event and it worked. Also I discovered that in the forms that the SETFOCUS was working, the form(s) had been called from other events Not from When or Valid Event

The solution to this is not to call other forms from valid(), when(), rangehi(), rangelo() because these forms may contain setfocus somewhere in them. You may set a flag in any of these methods and return .t., and then in lostfocus check for this flag, call the form, reset the flag. The flag would be best set as a property of the object, so each object would have its own.

Also, if validation should return .f., then your lostfocus should do a NoDefault, to prevent the control from actually losing the focus.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform