carriage return

  • Thread starter Thread starter Rulle
  • Start date Start date
R

Rulle

Hi!

How do I insert a newline in a textbox?
I've tried this without success..

textBox1.Text = textBox1.Text + "\n";

Thanks!
 
How do I insert a newline in a textbox?

Newlines on Windows are "\r\n" (Carriage Return - Line Feed).
Preferrably you use Environment.NewLine.



Mattias
 
Hi,

In adittion to Mattias comments you should need to set TextBox.Multiline =
true;

Cheers,
 
Back
Top