Forum > General

Copying a textbox also copies its event handling


I just realized that now if you copy a textbox that has an event such as OnExit and paste the textbox the associated events are still linked to the original textbox in the new copied textbox?

I've often copied sets of components such as a label and textbox after I have them properly formatted. Then paste them on the form and rename them. This always worked in the past but at least with the latest version any events attached to the original text box are copied also? Is there a way to turn this off?

I don't know if there is a way to turn this off, but, as I remember, events were always copied along with components.
They are not copied to another form if method name doesn't exists there. So, as a workaround, you could copy your components to some empty form, they will 'lose' events references, and then you can copy them back to your original form.


[0] Message Index

Go to full version