Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Class Design Question
Message
From
06/12/2006 13:13:21
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
01174970
Message ID:
01175313
Views:
6
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.
Previous
Reply
Map
View

Click here to load this message in the networking platform