How to create a container control
-
Hi folks, I recently stumbled about an annoying problem while designing components: It just seems impossible to me to create a control that allows other controls to be put upon at designtime. As far as I understood the MSDN every control derived from UserControl has the ability to support child controls. That works ok when adding controls simply by code but I can't add them using the designer. I tried to set AllowDrop to true and played around with the DragDrop events. The problem is I didn't found a way to extract the control from the DragEventArgs parameter (if it is there at all). :confused: Would be great if anybody could tell me how to create a control that act like the GroupBox for example, including visual component adding. Thanks in advance, Matthias
-
Hi folks, I recently stumbled about an annoying problem while designing components: It just seems impossible to me to create a control that allows other controls to be put upon at designtime. As far as I understood the MSDN every control derived from UserControl has the ability to support child controls. That works ok when adding controls simply by code but I can't add them using the designer. I tried to set AllowDrop to true and played around with the DragDrop events. The problem is I didn't found a way to extract the control from the DragEventArgs parameter (if it is there at all). :confused: Would be great if anybody could tell me how to create a control that act like the GroupBox for example, including visual component adding. Thanks in advance, Matthias