Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Very New to Programming Need advice .
#4
Well, what you can actually do is create a method that checks all of the textbox's text contents, and if they are all empty, set the button's visible property to false.

This can be done like so:
[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 Is Nothing) 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 Is Nothing) Then
KryptonButton1.Visible = False
Return
ElseIf (KryptonTextBox3.Text Is Nothing) Then
KryptonButton1.Visible = False
Return
ElseIf (KryptonTextBox4.Text Is Nothing) Then
KryptonButton1.Visible = False
Return
Else
KryptonButton1.Visible = True
Return
End If
End Sub[/code2]

Essentially, this sub will be called anytime any of those four textbox's text is changed, and if there is no text entered, the button will become invisible. If this is not the case and all textboxes have text, the button will be visible.

Hopefully this makes sense.
My Blog | My Setup | My Videos | Have a wonderful day.


Messages In This Thread
Re: Very New to Programming Need advice . - by brandonio21_phpbb3_import2 - 05-03-2013, 02:41 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Sockets Programming(Disconnecting from Server) xolara 1 9,386 04-06-2012, 01:47 PM
Last Post: brandonio21

Forum Jump:


Users browsing this thread: 1 Guest(s)