Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding code programmatically
Message
 
 
À
12/10/2004 06:03:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00950358
Message ID:
00950693
Vues:
13
This message has been marked as the solution to the initial question of the thread.
You will not be able to write code to a method at runtime. This is why I suggested you store code where you want then use EXECSCRIPT() to run that code. You just need to put the EXECSCRIPT() in the method you want. When you add the object programmatically to a form at runtime, this object should be sub-class of your own making (e.g., MyTextBox, MyCheckBox) that has the EXECSCRIPT() code in the methods you are interested in.

>Thank You Mark,
>But my problem is where to write the execscript() command.
>Actually i have a grid class which shows me a list of records.
>Till Yesterday I need to exeute something in it's afterrowcolChange event,
>and something in the click event of a checkbox i programmatically add to the grid. To do that I create a checkbox object in which I impose it's click event to check a variable containing some code and then if it was not empty process it. The I fill this Property when I add the object programmatically.
>Today I want to process something in the doubleclick event of a textbox.
>What I wantto avoid was to create a specific class of tetbox, if I only could fill the doubleClick event with some code !!!!!
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform