05-04-2013, 11:17 PM
Well the code snippet above should do what you want it to do; however, we may be having problems with our usage of the "Nothing" comparison.
Try this:
[code2=vbnet]Public Sub CheckForText() Handles KryptonTextBox1.TextChanged, KryptonTextBox2.TextChanged, KryptonTextBox3.TextChanged, KryptonTextBox4.TextChanged
'this will be called anytime the textbox's text is changed
If (KryptonTextBox1.Text.Equals("")) Then 'the user didn't type in text for this box
KryptonButton1.Visible = False 'set the button to be invisible
Return 'exit the sub since we don't need to do anything else
ElseIf (KryptonTextBox2.Text.Equals("")) Then
KryptonButton1.Visible = False
Return
ElseIf (KryptonTextBox3.Text.Equals("")) Then
KryptonButton1.Visible = False
Return
ElseIf (KryptonTextBox4.Text.Equals("")) Then
KryptonButton1.Visible = False
Return
Else
KryptonButton1.Visible = True
Return
End If
End Sub[/code2]
Try this:
[code2=vbnet]Public Sub CheckForText() Handles KryptonTextBox1.TextChanged, KryptonTextBox2.TextChanged, KryptonTextBox3.TextChanged, KryptonTextBox4.TextChanged
'this will be called anytime the textbox's text is changed
If (KryptonTextBox1.Text.Equals("")) Then 'the user didn't type in text for this box
KryptonButton1.Visible = False 'set the button to be invisible
Return 'exit the sub since we don't need to do anything else
ElseIf (KryptonTextBox2.Text.Equals("")) Then
KryptonButton1.Visible = False
Return
ElseIf (KryptonTextBox3.Text.Equals("")) Then
KryptonButton1.Visible = False
Return
ElseIf (KryptonTextBox4.Text.Equals("")) Then
KryptonButton1.Visible = False
Return
Else
KryptonButton1.Visible = True
Return
End If
End Sub[/code2]