By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,892 Members | 1,251 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,892 IT Pros & Developers. It's quick & easy.

Enabling Button when All Textboxes have information in them.

P: n/a
JM
Good Day

I am new at this programming thing but I thought I would give Windows Forms
a shot.

I have a form that has 3 text boxes on it and a button which is Disabled by
default in the properties. I want to "enable" the button when there is text
in the 3 textboxes.

Is there a property or something on the text boxes so I can enabled that
button when there is text in the boxes? You know like an OnUpdate or
OnChange??
Nov 16 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
You can use the TextChanged event.

private void textBox1_TextChanged(object sender, System.EventArgs e)
{
button1.Enabled = (textBox1.Text.Trim() !="");
}

"JM" wrote:
Good Day

I am new at this programming thing but I thought I would give Windows Forms
a shot.

I have a form that has 3 text boxes on it and a button which is Disabled by
default in the properties. I want to "enable" the button when there is text
in the 3 textboxes.

Is there a property or something on the text boxes so I can enabled that
button when there is text in the boxes? You know like an OnUpdate or
OnChange??

Nov 16 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.