On clicking left button, alignment of textbox should be changed in VB.NET.(one textbox,three button)
PROPERTIES:
CODEING:
Button1 | |
Text | << |
Button2 | |
Text | = |
Button3 | |
Text | >> |
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
TextBox1.TextAlign = HorizontalAlignment.Left
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
TextBox1.TextAlign = HorizontalAlignment.Center
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
TextBox1.TextAlign = HorizontalAlignment.Right
End Sub
End Class
DESIGNING:Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
TextBox1.TextAlign = HorizontalAlignment.Left
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
TextBox1.TextAlign = HorizontalAlignment.Center
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
TextBox1.TextAlign = HorizontalAlignment.Right
End Sub
End Class
Comments
Post a Comment