This tutorial will show you how to add new text to new line in one TextBox. The sample below I use 3 Textboxes which is TextBoxWord1 contains main text and show result too, TextBoxWord2 contains text which will be added to new line and the last textbox is TextBoxWord3 which contains text that will be added to next line of text(TextBoxWord1).
No | Control Type | Name | Text |
1 | Form1 | FormEditTextbox | EditTextbox |
2 | TextBox1 | TextBoxWord | |
3 | TextBox2 | TextBoxWord1 | |
4 | TextBox3 | TextBoxWord2 | |
5 | Button1 | ButtonNewLine | New Line |
Code
Public Class FormEditTextbox
Private Sub ButtonNewLine_Click(sender As Object, e As EventArgs) Handles ButtonNewLine.Click
TextBoxWord.Text = TextBoxWord.Text + Environment.NewLine +
TextBoxWord1.Text + Environment.NewLine + TextBoxWord2.Text
End Sub
End Class
0 comments:
Post a Comment