Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Adding code to the click event of a dynamic command butt
Message
 
To
14/04/2005 13:12:13
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 7
Miscellaneous
Thread ID:
01004762
Message ID:
01004968
Views:
21
try this... the approach has worked great for me in many similar types of situations...

create a class based on a container. In the container, put a label and a command button. The click event of the button can always refer to This.Parent.YourLabel.Caption to get the component it needs... You could also put custom properties on the container as holding place in case you needed something else... Then, when you dynamically add the controls, they can have their properties set. If you have more than one instance of this control on a form, they will refer to their respective instance.

If you need more help/clarity, let me know...
Previous
Reply
Map
View

Click here to load this message in the networking platform