I have two checkboxes on my form; chkBuried and chkAboveGround. I want to set it up so if one is checked, the other is unchecked. How can I
chkBuried
chkAboveGround
I would prefer radio buttons, but you can do something like this:
public void CheckACheckBox(Checkbox ck) { foreach (Control ckb in this.Controls) { if ((ckb is CheckBox) && (ckb == ck)) ck.Checked = true; else ck.Checked = false; } }