Windows Develop Bookmark and Share   
 index > Windows Forms General > Adding new line to a multiline text box
 

Adding new line to a multiline text box

Hi I wonder how can I add new line like enter to a multiline text box
I tried to enter
txtBox1.Text = "\n"; and it shows a weird character when I do that

Anyone please help me

Thank's
MigrationUser 1  Monday, October 13, 2003 6:57 AM
I never know which way a component will go. Textboxs perfer "\r\n" the carriage return and linefeed pair. I have kind of left the C special characters on this issue. I now use something like the following:

string str = string.Format("Line 1{0}Line 2{0}Line3",Environment.NewLine);


 
MigrationUser 1  Monday, October 13, 2003 9:29 AM

You can use google to search for other answers

Custom Search

More Threads

• MethodNotFound when invoked from a forms control
• Alterations to a TextBox
• Opening a website in a browser, in a NEW window
• Button question
• How can I drag controls around on a form? PLEASE HELP!!!
• Can TextRenderer.MeasureText() throw an exception ?
• Datagridviews and autocomplete
• Isolines in VB.net app
• Detect when an application is flashing in taskbar
• The new .NET 2.0 ConfigurationManager and Associated Classes