Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I build a method on the fly?
Message
 
À
23/10/2002 16:13:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00714534
Message ID:
00714614
Vues:
22
Create a class based on the type of control you are considering... textbox, combobox, etc...

In that class, put code in its InteractiveChange method with whatever "qualifier" you need to allow or disallow the process from happening. Something like this maybe...
FUNCTION MyTextBox.InteractiveChange
    IF ATC( "SomethingYouAreLookingFor", THIS.Name ) = 0
       */ Not one of the controls you need the special
       */ handling for... just return
       RETURN
    ENDIF

    */ Ok... it is one of the "special" classes you need to control
    */ Add code here...

ENDFUNC
Then, in your table that dynamically adds controls (which I assume has the type of control to be added), just let that column represent this NEW class just created.. ie: Instead of addobject( "combobox"...), AddObject( "MyCustomCombobox"...)

Hope this helps.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform