Hi all, I have a save button that should be disabled unless the checkbox is 'checked' the code I have makes no difference even though I think it should! Any help is appriciated.
private void EnabledCheckBox_CheckedChanged(object sender, EventArgs e)
{
var checkbox = (CheckBox)sender;
foreach (Control c in this.Controls)
{
if (checkbox.Checked)
SaveButton.Enabled = true;
else
SaveButton.Enabled = false;
}
}