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.
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Mike GoldRank #50 · 30.6K reputationPosted Jul 20, 2005, 3:45 AM EDT
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.