If I recall correctly, you disable the panel [using the enabled property] when the checkbox is unchecked, this will disable the items within the panel. You don't then need to disable all the items within the panel individually. Likewise, when you enable the panel again, it will re-enable the child controls.
myPanel.Enabled = false; //Child controls disabled
myPanel.Enabled = true; //Child controls enabled
You could also iterate each control within the panel using:
foreach(Control control in myPanel)
{
//Assume for the purpose of demonstration
//that each control within myPanel has an
//"Enabled" property
control.Enabled = myPanel.Enabled;
}
This would set the enabled property of each control within the panel to match that of the panel - really, this is surplus to requirement and therefore isn't really desirable. I just provided this method for demonstration purposes.
Edit: This could be extended [for example] by Rob's design for a user control which you could add a property to your user control to expose the panel's controls collection:
public Control[] Controls
{
return controlPanel.Controls;
}
This would essentially allow modification of your control's panel controls from outside your user control and not require the controls to be assigned in the panel definition inside the user control.