newline character in a multiline textbox?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a multiline textbox where I want to insert a message on multiple lines. In the full .Net framework, I can do this by using the Environment.NewLine property like so:
txtMyTextBox.Text = "How are you?" + Environment.NewLine + "Good";

Does anyone know of a work-around, since both Environment.NewLine is not supported and "\n" doesn't work either?

Thanks,
Stephen
 
Try this:
txtMyTextBox.Text = "How are you?\r\nGood";

--
Chris Tacke, eMVP
Co-Founder and Advisory Board Member
www.OpenNETCF.org
---
Windows CE Product Manager
Applied Data Systems
www.applieddata.net


stevebju said:
I have a multiline textbox where I want to insert a message on multiple
lines. In the full .Net framework, I can do this by using the
Environment.NewLine property like so:
txtMyTextBox.Text = "How are you?" + Environment.NewLine + "Good";

Does anyone know of a work-around, since both Environment.NewLine is not
supported and "\n" doesn't work either?
 
Back
Top