I want to set a CheckBox on the top of a GroupBox like in this picture to enable/ disable the groupBox:
but in this position, the checkBox is contained within the GroupBox child controls, so it is disabled once I disable the GroupBox..
So Is there a way to keep it in this location , but excluding it from the groupBox controls?
I tried, Bring to front, but doesn't help!
I'm assuming you're trying to do this via the designer? If so, then as soon as you move the
CheckBox over the
GroupBox, the designer will automatically assume (not unreasonably), that you want the
CheckBox to be contained by the
To get around this, drag the
CheckBox outside of the
GroupBox, right-click on the
CheckBox and select "Bring to Front" so that it will be drawn on top, and then edit the
CheckBox's position manually via the
Location property in the Properties window.
Don't modify the
CheckBox's position via the mouse afterwards or the designer will put it back into the
GroupBox and you'll have to reposition manually again.