Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding a property to a form?
Message
De
20/01/2004 12:15:51
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00868586
Message ID:
00868601
Vues:
14
Steve,

Instead of creating a label on the child form and then setting it to reference the parent form, create a property of the parent form. From the menu, you can access the AddProperty dialog for either the form or class that you're designing. You can name the property oCallingForm.

Then, you childform.init code should work. You'll be able to reference the parent form and any objects contained on it from the child form by using the object reference property you've created in the child form. For example, if you want to refresh the parent form, from a method of the child form, to this in your child form method:

Thisform.oCallingform.Refresh()

Hope this helps.
Alan

>Hi
>I would like to be able to call a child form from a parent as follows:
>*In the parent, in the init()
>do form callerChild with thisForm
>* and in the init() of the childForm
>lpara ToCaller
>thisform.oCallingForm = toCaller
>
>I tried creating a label in the child form and naming it oCallingForm but when I run the
>parent form and it tries to call the child, I am told that oCallingForm must be a property not a
>method, event or an object.
>
>How can I make oCallingForm a property in the child form. Is there a way to add
>additional properties to a form?? With #DEFINE ??
>Thanks so much
>Steve Elster
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform