Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Class Design Question
Message
De
06/12/2006 13:13:21
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
01174970
Message ID:
01175313
Vues:
7
Hi Kevin.

regarding the definition as in the help it should work, as Text1 is a member of the containerclass, but I get the same effect.

Nevertheless calling an event is also not a good thing at all. Turn it around: Remove the call but add to the Init() of the container:
bindevent(This.Text1,"MouseEnter",This,"MouseEnter")
Now Text.MouseEnter will raise Container.MouseEnter. This works even, if Container.MouseEnter is protected.

But then Text1.MouseEnter can still be overloaded and you cannot set it protected. Especially if you first define a Textbox class with protected MouseEnter event, using that within the container you cannot bind to it anymore, as it's protected.

So still, the idea of building it up from a control base class should get you what you want, as a user of that class can't see the inner structure at all.

Bye, Olaf.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform