Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding a property to a form?
Message
From
20/01/2004 12:15:51
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00868586
Message ID:
00868601
Views:
15
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
Previous
Reply
Map
View

Click here to load this message in the networking platform