Hey all
I've got a form and several checkboxes. Each checkbox (if checked) runs a batch file which in turn installs a piece of software.
The 2 is question are Acrobat Pro and Acrobat Standard - obviously only one can be installed. Therefore when one is checked by a user, another should become disabled and vice versa. It sounds simple but I can't seem to get it to work.
First off I tried adding if loops to the CheckedChanged event for each checkbox, but that only worked one way (e.g. checking a box would disable the other, but unchecking it wouldn't re-enable the other). So now I've tried sticking the if loop in the main namespace.
public Form1()
{
InitializeComponent();
if (acrobat_pro_chkbox.Checked)
{
acrobat_standard_chkbox.Enabled = false;
}
if (acrobat_standard_chkbox.Checked)
{
acrobat_pro_chkbox.Enabled = false;
}
}
I can't see why this wouldn't work? Checking either box doesn't seem to do anything at all.
Any help would be appreciated.