Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

\n not giving new line in edit box ????

Status
Not open for further replies.

sjmolloy

Programmer
Aug 23, 2001
14
GB
Hi,
I want to display several lines of text in a multiline
edit box. Eachline is displayed when an element of a
list box is double clicked.
The text is being put into the associated variable in a switch
about in the following way
......m_output = "ok - print this out \n";
The text is currently displaying in the edit box with a "funny"
| type character at the end and the cursor is not moving to the next
line. When the next line of text is displayed it appears
immediately after the | character and is also followed by the | .

The \n seems to be misinterpreted .....how do I get a carriage return????
 
"\n\r" Ion Filipski
1c.bmp


filipski@excite.com
 
Thanks for response but unfortunately this doesn't work either.
\n gives one funny character at the end of the text.
\n\r gives two funny characters and still no new line !!

It seems a bit quirky !!
 
does your edit have Multilyne in style? If not, check it. Ion Filipski
1c.bmp


filipski@excite.com
 
Yes , Multiline is checked in the "Styles" tab of the Edit properties box.
 
I dont know if this is the problem and I highly doubt it but whenever I use the /n and the /r i have them reversed from what Ion said.

"\r\n"

Dont know if this will do it for you tho

Matt
 
Excellent guys ...thanks a million !
You don't know how many hours I have spent on such a little problem !!
"\r\n" works....
"\n\r" gives the funny characters.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top