Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding custom optionbuttons to optiongroup
Message
De
21/04/1998 16:43:44
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00091946
Message ID:
00093815
Vues:
28
>One possible way of doing this is to set up an OptionGroup subclass that contains cClassLib and cClassName properties. Set these to be the OptionButton you really want to use. Visually design the OPG however you want. Then in the OPG Init() use AddObject() to add the needed number of your buttons, copy the properties from the orginal buttons to the new ones, then RemoveObject() the originals.

I have a OptionGroup base class that does this, as well as a OptionButton base class that is the default OptionButton for this OptionGroup, though a subclass of that OptionButton can be used. It's not as flexible as I would like, since I have to generate a subclass for any variantion of any given button (such as method code). But it's much better than what is originally there.

I do have to wonder why OptionButtons and other base classes were written as code inside other .VCX class definitions, rather than independent class records in the .VCX.
David M. Stowell
Ravenslake Consulting
Chicago, Illinois

e-mail: davidstowell@ravenslakeconsulting.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform