Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I pass the calling object to a procedure?
Message
De
09/12/2001 21:59:04
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00591907
Message ID:
00591911
Vues:
21
>Hi Guys,
>
>I'm a VFP 7.0 newbie and need to find out how I pass the calling object's name to a common procedure. I have a form with 20 objects and I want each object to call procedure "f_doubleclick" when the user double clicks on that object. the procedure would act differently based on which object the user clicked on. so the doubleclick event of each object would read "do f_doubleclick" and nothing else.
>
>Thanks for your time,
>
>Nancy

Hello, Nancy

You can pass the object using 'This' as parameter. You can also specify the full hierarchy of the object.
f_doubleclick(This)
or

f_doubleclick(this.parent.listbox1)



Hope this helps,
Grigore Dolghin
Class Software.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform