Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing controls with setfocus()
Message
De
24/08/2008 22:38:51
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
24/08/2008 15:12:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Database:
Visual FoxPro
Divers
Thread ID:
01341355
Message ID:
01341421
Vues:
17
>Your suggested approach is quite similar to what I had started trying. The key from your post was that there is no magic bullet solution, so you got me back to work on the problem. It’s working now, and here’s what I ended up with:
>
>A global (public) variable gcCameFrom
>
>For each txtBox, or other control, that changed the grid’s RecordSource content
>In GotFocus()
gcCameFrom = This.Name
Except that this.name is relative to .parent; if you have instantiated a same composite class several places - say, a container with two or three textboxes to enter phone number, area code, internat country code etc - the members of that container will have the same names in every instance, names you can't change.

I'd suggest
gcCameFrom=sys(1272, this)
which would give you full hierarchy, or even
goCameFrom=this
as a direct object reference, but in that case you'd have to make sure you clear that when your form loses 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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform