Question Sub-Controls Copying

AK777

New member
Joined
May 12, 2010
Messages
1
Programming Experience
10+
I created a multi-column combo box control that inherits from the standard combo box. The control has a custom property which is a list of column definitions. When I copy an instance of the control, this list of column definitions does not copy correctly.

How can I do this?

Example:
I add custom combo box to a form and it is called CustomComboBox1. I add column definitions col1, col2 and col3 to this control. When I copy CustomComboBox1 and paste it on to the form, I want the second control to be titled CustomComboBox2 and I want the column definitions also copied and be titled col4, col5 and col6.

But that is not what happens. The second control copies correctly, but it's columns definitions are col1, col2 and col3. Now, both the custom combo boxes use the same column definitions.

How can I copy the custom control and create new instances of the column definitions.
 

Latest posts

Back
Top