C#.NET: How to create a new line in textbox control?

I was doing some programming today in Visual Studio 2008 and came across a problem on how to create a new line in textbox control. So, how?

"\r\n"

Sample code:

tb.Text = "Hello\r\nWorld"

Output:

Hello

World


 

That's it!

Comments

  1. Wow, I never thought how easy it was. Thanks!

    ReplyDelete

Post a Comment

Popular posts from this blog

Creating tray application and popup context menu in Windows

How to statically link applications to wxWidgets via Visual Studio 2008 and in Linux

How to put an image to wxPanel using wxWidgets