Reflecting escape characters in multiline textbox?

  • Thread starter Thread starter Steven
  • Start date Start date
S

Steven

.... so I faced a problem.
When adding such a value to the txtBox.Text property: "Connected
successfu.\nEnter new data.", I get no newline effect. Instead there is that
message in one row diveded with tokens look like bold wertical dashes. Thus
any escape character in my code convertes into that token.
What is the solution?
 
Steven,
... so I faced a problem.
When adding such a value to the txtBox.Text property: "Connected
successfu.\nEnter new data.", I get no newline effect. Instead there is that
message in one row diveded with tokens look like bold wertical dashes. Thus
any escape character in my code convertes into that token.
What is the solution?

A newline in Windows is \r\n - use Environment.NewLine.



Mattias
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top