I’m quite new to VB.net (and VS 2008), so I’m afraid my question might be basic, but I’m not sure how to solve it.
I have a winform with three textbox fields and a button. All textbox fields must be filled before the user can click the button to continue. To this end I would like to disable the button as long as there is at least one empty textbox.
If I had only one textbox field, it would be easy for me to do. In the Textbox1_Leave event I would check if Textbox1.Text is not empty and if so, set Button1.Enabled = True.
But what should I do if I have three textboxes? Have three event handlers, one for each textbox? Or is there a way I’m not familiar with?
Many thanks.
And, even better, if these controls all have the same parent, and are the only textboxes in the parent (say, all nested in a groupbox), you can do it something like this: