Hello can any one help.
I have
CheckBox
and
TextBox
in Windows Forms, I would like to have if i make (
CheckBox.checked==false
) and
TextBox.Text
is not null, then i would like to make
TextBox.clear()
and next step I would like
TextBox Key.Enter
eventargs, then
TextBox.Enable==false
.
Here is the code
private void checkbox_CheckedChanged(object sender, EventArgs e)
{
if (checkbox.Checked == true)
{
this.textBox1.Enabled = true;
}
if (checkbox.Checked == false)
{
textBox1.Clear();
this.textBox1.Enabled = false;
}
}
Is it possible to do this please, thanks in advance