Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calling method from parent form
Message
De
09/09/1999 12:00:57
 
 
À
09/09/1999 11:55:58
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00262927
Message ID:
00262934
Vues:
18
You have to pass the form pointer to the second form:

In Form1: DO FORM Form2 WITH THISFORM

In Form2.Init():
LPARAMETERS toForm
THISFORM.ParentForm = toForm && Store the pointer in a new property of Form2

To call Form1.TheMethod() from Form2: THISFORM.ParentForm.TheMethod()

HTH
>I have a method I would like to call from a parent form.
>
>ie: FORM1 (parent: has method TheMethod())
> Press cmd_btn triggers modal FORM2 (child)
> Press cmd_btn on modal FORM2 and call method FORM1.TheMethod
>
>Usually I would say THISFORM.TheMethod() from within the parent form I thought I could just call the method from the child form by FORM1.TheMethod().
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform