Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding event code programmatically
Message
 
 
To
28/02/2005 16:58:14
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
00991384
Message ID:
00991392
Views:
16
Where is this code that you want to add at runtime located? Use BINDEVENT() to delegate the When (or any) event to the object method where this code is located. If the code is in a memo field, for example, you will need to compile this code into a class at runtime then create an instance of that class so you can use the BINDEVENT to delegate your events.

>I have a form that has an area on it that one of several container class objects can be programatically added to it at runtime depending on a condition. Adding the container object from a class lib to the form at runtime works. But now I've had to extend things a bit and add a new textbox to the new container object that I just added to the form. And I've got that to work. But now I need to add some code to the When event of this new textbox at runtime. I know this sounds kind of convoluted but that's my task. Is there a way to do this? I can't find anything when I search VFP80 help or the UT.
>
>Any help would be greatly appreciated.
>
>Jim White
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform