R
Ray Mitchell
Hello,
I have some existing perfectly-working code like the following to detect the
state of a CheckBox check change. I decided to rearrange a few things into
different files, and the existing code still works perfectly. However, if I
add any new CheckBoxes the events still occur but the Checked property of the
CheckBox always tests false on those new CheckBoxes. Only the GUI thread
itself is involved. I get no compiler warnings and nothing blows up during
running. I'm at a loss as to how I even begin to debug a problem like this.
Could it be some sort of timing issue? Suggestions are appreciated.
Thanks,
Ray
private void checkBox_CheckedChanged(object sender, EventArgs e)
{
if (checkBox.Checked == true)
{
statement1;
}
else
{
statement2;
}
}
I have some existing perfectly-working code like the following to detect the
state of a CheckBox check change. I decided to rearrange a few things into
different files, and the existing code still works perfectly. However, if I
add any new CheckBoxes the events still occur but the Checked property of the
CheckBox always tests false on those new CheckBoxes. Only the GUI thread
itself is involved. I get no compiler warnings and nothing blows up during
running. I'm at a loss as to how I even begin to debug a problem like this.
Could it be some sort of timing issue? Suggestions are appreciated.
Thanks,
Ray
private void checkBox_CheckedChanged(object sender, EventArgs e)
{
if (checkBox.Checked == true)
{
statement1;
}
else
{
statement2;
}
}