G
Guest
I'm trying to write what I thought would be a pretty simple user control but I'm not having much luck. Basically, I want a groupbox with an associated checkbox, so that when the checkbox is false the groupbox is disabled.
I've been able to create the control (as a UserControl) and I've included th
[System.ComponentModel.Designer(typeof(System.Windows.Forms.Design.ParentControlDesigner))
attribute, but I'm still not getting the behavior that I want
When I drop a button on this control in the designer all I see is the area outline (not the button as is usual) and I don't see the button at all at runtime
I suspect that "somehow" I need to intercept the adding of the button to my usercontrol and redirect it to the groupbox within my usercontrol (or at least this seems like the thing to do), but I can't see how to do this. Overriding various methods and interfaces has left me scratching my head. I imagine this is pretty easy, it's just a matter of know how it's done
In short I basically want to create a usercontrol that contains a groupbox and I want embedded groupbox to act just like it does on a form.
Can anyone point me in the right direction or to an online sample that tackles this issue
Thanks
Static
I've been able to create the control (as a UserControl) and I've included th
[System.ComponentModel.Designer(typeof(System.Windows.Forms.Design.ParentControlDesigner))
attribute, but I'm still not getting the behavior that I want
When I drop a button on this control in the designer all I see is the area outline (not the button as is usual) and I don't see the button at all at runtime
I suspect that "somehow" I need to intercept the adding of the button to my usercontrol and redirect it to the groupbox within my usercontrol (or at least this seems like the thing to do), but I can't see how to do this. Overriding various methods and interfaces has left me scratching my head. I imagine this is pretty easy, it's just a matter of know how it's done
In short I basically want to create a usercontrol that contains a groupbox and I want embedded groupbox to act just like it does on a form.
Can anyone point me in the right direction or to an online sample that tackles this issue
Thanks
Static