Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cannot add objects to a class based on a control class.
Message
 
À
28/03/2005 15:20:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
00999521
Message ID:
00999526
Vues:
38
This message has been marked as the solution to the initial question of the thread.
>This is not correct. You can add objects to Control class ONLY if you are working with the first level of subclassing. Any other level does not allow you to add.
>
>Actually, this is what I have asked - why this class behaves so differently than the others? Is this by design? if yes, then it's a _bad_ design ;)

This is indeed by design (see my other post) and many people do believe that the control class is pretty useless because of it. The main purpose of the control class is to build a control that can be extended with code, but without adding more objects. More objects would mean it is a different control. You could add all the objects you need and show/hide them as appropriate or just design different controls for each purpose.

And if you don't like that, then you can just use a container instead of control. And you may want to do that and mark the objects as protected to see if you still get your desired outcome.

HTH,
Chad
_________________________________
There are 2 types of people in the world:
    Those who need closure
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform