Actually, if you set the Enabled property of the group box to false. All content in it (text box, etc.) will also be disabled. But you can still do this using:
foreach (Control ctrl in groupBox1.Controls) { if (ctrl is TextBox) { ((TextBox)ctrl).ReadOnly = true; } }
source share