c# - How do I drag and drop copy of controls -


How did I take control and search and search on the Internet had to drag and drop the extension control, I have no solution How to copy control of mixed panels / groupboxes etc.

I am developing an application in which I drag from one panel to another panel and open the drop button, what I want, draw a button from panel 1 and paste "copy" in panel 2 Here is a screenshot

Enter image details here

In one way an object has a protected method called a cloned subscription, which is used by all members A high level clone is your object that you can read about here:

ICalable interface: supports cluning, which creates a new instance of a class with the same value as an existing instance .

The ICloneable interface enables you to provide a customized implementation that copies the existing object. The ICLible interface has a member, the clone method, whose purpose is to provide cloning support provided by the object. For more information about cloning, deep vs. shallow copies, and examples, see the object. MailWire Clone Method

  Public class ControlCloner & lt; T & gt; {Public T Clone Object (T Source Object) {T New Object = New T (); // Set quality & amp; Consider the available methods on the new object incidents ... type class using reflection. Return a new object; }}  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -