Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to access the parent form property in child form obj
Message
De
05/06/2014 13:40:58
 
 
À
05/06/2014 13:26:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP3
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01601319
Message ID:
01601370
Vues:
28
Which is how I do it. In my custom form baseclass, I have a property called oCaller to hold a reference to the calling program. In the init I have this code:
If Type([_screen.activeform.name]) = [C]
   This.oCaller = _Screen.ActiveForm
Endif
>in the init of the childform the current active form is still in _VFP.activeform
>so you can add formproperty to all forms and in init set it to _VFP.ActiveForm
>
>
>Peter
>
>>Hi,
>>
>>I have a property nlineno in the parent form, and I pass the form to the child form as follow
>>
>>
>>do childrorm with thisform
>>
>>the child form init method
>>
>>lparameters opform
>>
>>I can display out the value of the opform.nlineno in the child form's init method,
>>
>>Messagebox(opform.nlineno)
>>
>>but I can't display out the value in the Button object in the child form's click method,
>>it prompt me an error message, "object opform is not found", when I click the button in the child form.
>>
>>Why ?
>>Please advise
>>
>>Derek Yim
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform