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!

Carriage Returns in multiline edit control

Status
Not open for further replies.

MrSandman666

Programmer
Feb 5, 2001
54
DE
so here I go with another embarassing newbie question.

I have a bunch of numerical values (integers) which I want to display in a mutiline CEdit control, each on a seperate line.

I tried something like this:

sFormatString.Format("%d\n", i);
sList += sFormatString;
cEditControl.SetWindowText(sList);

but it didn't work.
The numbers where displayed correctly but instead of the linefeeds I get these vertical lines and it looks like this:

1|3|15|23|12|

Any idea what a solution to this could be?
I did enable the "return possible" property for the control and, yes, it's set to multiline.

Thanks a lot in advance
 
Oh... so close !

sFormatString.Format("%d[red]\r[/red]\n", i);


-pete
 
[dazed]
Allright, I triet \n and I tried \r. Both of them had the same result. I never got the idea to actually combine the two!
Thanks for helping me out (again)!
Works great now!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top