Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / General / January 2007

Tip: Looking for answers? Try searching our database.

"\n" at the end of a TextBox line displays as a small []

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
aesper - 30 Jan 2007 19:02 GMT
I have a windows forms application with a TextBox display. I use the
following code to display a line in the TextBox:

.....
statusTextBox.AppendText(message + "\n");
......

I just want the text box to insert a new line after the message, it does
insert the new line but the [] always appears in the text box.
How can I add a new line without displaying []??
Any help is appreciated.

Thanks,

Esper
aesper - 30 Jan 2007 19:05 GMT
I used "\r\n" instead of "\n" and it works.....

> I have a windows forms application with a TextBox display. I use the
> following code to display a line in the TextBox:
[quoted text clipped - 11 lines]
>
> Esper
Rad [Visual C# MVP] - 30 Jan 2007 20:07 GMT
> I used "\r\n" instead of "\n" and it works.....
>
[quoted text clipped - 13 lines]
>>
>> Esper

Or better yet, Environment.Newline
Signature

Bits.Bytes
http://bytes.thinkersroom.com

Raymond Yuen - 31 Jan 2007 04:32 GMT
Apart from the solution given by Rad, the new line character in Windows
platform contains 0x0D and 0x0A.

Regards,
Raymond

>> I used "\r\n" instead of "\n" and it works.....
>>
[quoted text clipped - 15 lines]
>
> Or better yet, Environment.Newline

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.