Attach a child control on a Custom Control
Hi,
I am programming a custom control behaving almost as a GroupBox control. At design time, when I drop another control (say a CheckBox)on this GroupBox, it does not seem to be attached to it. I know I have to call the GroupBox.Controls.Add method, but I do not know where to do that. Using the DragDrop event of the GroupBox, I am not able to find any references of the "being created" CheckBox, in fact, I think that it does not even exist. So what is the solution?
Many thanks
Christophe.
Mike GoldPosted Jul 20, 2005, 7:45 AM
itself in order to make this happen. This will involve the System.Drawing.Design namespace,
ITypeDescriptor and possibly the System.Windows.Forms namespace. You'll need to create classes
from these namespaces and override behavior in these classes.
Mike G.