I need to create a Custom TextBox for output of text.
As such, I created one with TextBox, MultiLine, Read Only and added a property to append text into the TextBox.Text.
I then run into the issue of NewLines.
After consultation with text book, I added the \n, but it does not work.
Then I added the \n\r, and still does not work.
Finally, I googled and discover that \r\n should be use.
That means the order is important. \r\n - OK, not \n\r.
This I hope will be of help to anyone seeking to embed newline
in a multiline TextBox.
Comments welcome on C# and .NET development.
As such, I created one with TextBox, MultiLine, Read Only and added a property to append text into the TextBox.Text.
I then run into the issue of NewLines.
After consultation with text book, I added the \n, but it does not work.
Then I added the \n\r, and still does not work.
Finally, I googled and discover that \r\n should be use.
That means the order is important. \r\n - OK, not \n\r.
This I hope will be of help to anyone seeking to embed newline
in a multiline TextBox.
Comments welcome on C# and .NET development.
