Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Subclassing OptionButton
Message
 
 
À
05/10/1998 09:29:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00143846
Message ID:
00143918
Vues:
23
>Am trying to add an OptionGroup to my class library and want to incorporate my own properties & methods with the associated OptionButtons.

>The ButtonCount of the OptionGroup will vary each time I add my new class to a form. Will I have to create the OptionGroup class with the maximum number of Buttons forseen and then change the ButtonCount property to a lower number ? Or is there a better way ?

Create the lowest level OptionGroup subclass with 0 buttons in it. Then when you drop it on a form you are free to set the number of buttons you want and you can name them anything you want. If the class has a predefined number of buttons the predefined ones can not be renamed.

Another way of handling the usinging your subclass OptionButton is to at OptionGroup.Init time exchange the default buttons with your own subclass and copy the properties from the original to the new.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform