Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Subclassing OptionButton
Message
 
 
To
05/10/1998 09:29:26
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00143846
Message ID:
00143918
Views:
22
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform