I am trying to add a line of text to a TextBox component in VB.net, but I cannot figure out for the life of me how to force a new line. Right now it just adds onto what I have already, and that is not good.
I have tried copying the actual linebreaks, didn't work. I tried AppendText(), didn't work.
How on earth do I do this? It is multiline already.
or
This, is how it is done.
The richtextbox also has a "Lines" property that is an array of strings. Each item in this array ends in an implicit line break and will be displayed on its own line.
If your text is static or has an initial value and you are using the designer in Visual Studio you can simply add lines directly there.
Try something like
Have you tried something like:
textbox.text = "text" & system.environment.newline & "some more text"
Quickie test code for WinForms in VB:
You can also use
vbNewLine
Object as in