I have a user control which is esentially a combination of a checkbox and a textbox. I want it so that if the checkbox is clicked, the textbox be active and otherwise don't. I have this code for the clicked property of the user control:
In the designer I got six instances of this control. Four of them are checked, two aren't - in the designer everything is fine. But as soon as I click the start debugging button, the two disabled textboxes become enabled and while running clicking the checkboxes has no effect whatsover - the corresponding textboxes are always active. Why so?
I've builded the project multiple times.
[Category("Appearance")]
[Description("Gets or sets the state of the checkbox.")]
public bool Checked
{
get { return checkbx.Checked; }
set {
checkbx.Checked = value;
if (checkbx.Checked == false) textbx.Enabled = false;
else textbx.Enabled = true;
}
}
In the designer I got six instances of this control. Four of them are checked, two aren't - in the designer everything is fine. But as soon as I click the start debugging button, the two disabled textboxes become enabled and while running clicking the checkboxes has no effect whatsover - the corresponding textboxes are always active. Why so?
I've builded the project multiple times.