M
Miro
I wanted certain text boxes ( only certain ones ) to always be Trim'd so
that spaces are not in the begining,
nor the end of the text entered.
I created my own "Handle ?" - i hope thats the right terminology,
and it works. Is this the right way to do this?
I had to use DirectCast to get the textbox name.
Private Sub TrimValues(ByVal sender As System.Object, ByVal e As
EventArgs) _
Handles txtOne.Leave, txtTwo.Leave, txtThree.Leave, txtFour.Leave, _
txtFive.Leave, txtSix.Leave, txtSeven.Leave
DirectCast(sender, TextBox).Text = Trim(DirectCast(sender,
TextBox).Text)
End Sub
Thanks,
Miro
that spaces are not in the begining,
nor the end of the text entered.
I created my own "Handle ?" - i hope thats the right terminology,
and it works. Is this the right way to do this?
I had to use DirectCast to get the textbox name.
Private Sub TrimValues(ByVal sender As System.Object, ByVal e As
EventArgs) _
Handles txtOne.Leave, txtTwo.Leave, txtThree.Leave, txtFour.Leave, _
txtFive.Leave, txtSix.Leave, txtSeven.Leave
DirectCast(sender, TextBox).Text = Trim(DirectCast(sender,
TextBox).Text)
End Sub
Thanks,
Miro