Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can you (I mean can I) programatically subclass a method
Message
De
18/01/2000 15:21:12
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00319562
Message ID:
00319599
Vues:
10
>OK, I think I see: You're visually adding the optionbuttons on the sub-classed optiongroups, and you want a universal keypress event. You could add optionbuttons to your class, and modify those, instead of adding, or just create an optionbutton class with your KeyPress event, and add those.

But this is a variable numbered group of options.

So... we can do what we do in pageframes. Instead of having Zero Options, lets have about 20 or 30, more than we would ever use. Then we create a property that lets us specify how many buttons we want (This has to be a custom property).

Then we design our buttons like we want, if we only plan to use 3 buttons, only modify the first 3.

Then at runtime, based on the custom property telling us how many buttons to use, we remove all the uneeded buttons.

That way all code properties and classes sctuff is preserevd.

You can do a loop with RemoveObject, but I think just doing:

This.ButtonCount = This.nRealButtonCount

Will do the trick.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform