Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Main container - how to detect it?
Message
 
À
08/11/2003 20:06:35
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00848006
Message ID:
00848108
Vues:
11
Hi Michel

What I did was create a function in the container and Page classes which did the following:

For containers:

Function GetMainContainer
Return This.Parent
EndFunc

For Pages:

Function GetMainContainer
Return This.Parent.Parent
EndFunc

Since my framework is based on presentation objects based on the container class I changed the function in this class to:

Function GetMainContainer
Return This
EndFunc

So to get a reference from any widget to the highest non-form container I simply do:

loContainer=This.Parent.GetMainContainer()

I use presentation object because they are not added to the form until it is activated so I can open a number of forms quickly.

Regards
Simon


>I remember having seen something in regards to that. Basically, from a text field control, I need to know if the main container is a toolbar or a form. What would be the easiest appraoch for that?
Simon White
dCipher Computing
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform