Information générale
Catégorie:
Codage, syntaxe et commandes
>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement