I have two textboxes on a form and have the following code in the Leave event of one of them. The problem is that once the textbox has focus, you can't leave it if the textalign property has changed. I need a way around this without setting focus to the next control manually. I still have to see if is framework or language related with the same code in C#. HELP!!:confused: Private Sub TextBox1_Leave(ByVal sender As Object, _ ByVal e As System.EventArgs) Handles TextBox1.Leave If TextBox1.TextAlign = HorizontalAlignment.Left Then TextBox1.TextAlign = HorizontalAlignment.Right Else TextBox1.TextAlign = HorizontalAlignment.Left End If End Sub
A
adarobwpg
@adarobwpg
Posts
-
Problems with a text box & changing alignment in the leave event.