Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to reference a mdi form from a child form?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00666004
Message ID:
00666007
Vues:
15
Chris,

the TL form is not the parent of the MDI forms. Think of this like MDI forms in the _SCREEN, they cannot refer to _SCREEN as their parent either.

You could pass a reference to the TL form into your MDI forms's Init, or you could create a property in your application object (if you have one) that holds a reference to it, or you could create a global variable in the TL form's Init like oTLForm = THIS, the MDI forms can talk to. An even better practice would be, not to try to manipulate the objects that exist somewhere in the application directly. Instead you could call a method in your TL form or in the application object, that does the manipulation for you.

HTH,
Armin

>Hi I have a mdi top level form and I have added a container class with buttons as a toolbar. I launch other mdi forms as "show in top level" and it works fine - these are my various data entry forms... My question is how do enable/disable the buttons in my container class on the top level mdi form?
>I have tried this in the "show in top level form"...
>
>thisform.parent.myContainer.myButton1.enabled = .t.
>
>but I get the error "Parent is not an object"
>Any ideas appreciated!
>Thanks
>Chris

Armin Neudert
Regional Director (Stuttgart) of German FoxPro User Group dFPUG

MCP for Visual FoxPro

Expert/Editor of the VFP section in the German Codezone community portal
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform