473,324 Members | 2,257 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

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

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
Jan 30 '07 #1
3 2870
I used "\r\n" instead of "\n" and it works.....

"aesper" wrote:
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
Jan 30 '07 #2
On Tue, 30 Jan 2007 11:05:01 -0800, aesper wrote:
I used "\r\n" instead of "\n" and it works.....

"aesper" wrote:
>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
Or better yet, Environment.Newline
--
Bits.Bytes
http://bytes.thinkersroom.com
Jan 30 '07 #3
Apart from the solution given by Rad, the new line character in Windows
platform contains 0x0D and 0x0A.

Regards,
Raymond

"Rad [Visual C# MVP]" <no****@nospam.comwrote in message
news:n6**************@thinkersroom.com...
On Tue, 30 Jan 2007 11:05:01 -0800, aesper wrote:
>I used "\r\n" instead of "\n" and it works.....

"aesper" wrote:
>>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

Or better yet, Environment.Newline
--
Bits.Bytes
http://bytes.thinkersroom.com
Jan 31 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Brian Morris | last post by:
I'm new to .NET and just trying a few things out, like emailing. I created a form in Visual Studio .Net to input some information for generating an email and I'm getting the following error when it...
3
by: Chris Mahoney | last post by:
Hi I have two machines, one running Win 2000 and VS.NET 2002, and one running Mac OS 10.2. I can develop web apps on my Windows machine, and look at them in IE, and they look fine. But if I...
1
by: jason | last post by:
I've seen a few posts on this issue, but no clear solutions. I have a mulitiline textbox inside a datagrid. I use TemplateColumn to define as multiline with 3 rows. I have other field types...
3
by: Jo Schambach | last post by:
I am trying to write a GUI with tkinter that displays the stdout from a regular C/C++ program in a text widget. The idea i was trying to use was as follows: 1) use "popen" to execute the C/C++...
3
by: Sathyaish | last post by:
What's with these newline characters and textboxes. I've noticed this in .NET and it wasn't prevelant in Visual Studio 6.0. Unless you have a richtext box, which displays the text representation...
1
by: DC | last post by:
The problem I'm using the .NET GridView and FormView objects for the first time and im getting the error "An OleDbParameter with ParameterName '@ID' is not contained by this...
2
by: manojsingh | last post by:
hi, I am developing on a Payroll system and using Jsp/servlet technology. For this I have created a Employee Information Page which has three buttons Add Employee Information , Modifiy Employee...
4
by: brsawvel | last post by:
Hello, I have a form that has two subforms within it (frm1 - subfrm1, subfrm2) Does anyone know how I can create an "On Click" event for a textbox -fld1- that is within -subfrm1-...
3
nev
by: nev | last post by:
my textbox displays "hello" i change the value of textbox through code like this: textbox.text = "" then i do: bindingsource.endedit() tableadapter.update(dataset.datatable)
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.