Click to See Complete Forum and Search --> : adding a new line in an editbox


Anders Eriksson
October 7th, 1999, 05:35 AM
How do I add a new line in an editbox?

I have tried this:
int tLen = GetEditCtrl().GetWindowTextLength();
GetEditCtrl().SetSel(tLen,tLen);
GetEditCtrl().ReplaceSel("\n");
tLen = GetEditCtrl().GetWindowTextLength();
GetEditCtrl().SetSel(tLen,tLen);
GetEditCtrl().ReplaceSel(buffer);




I get a new line but I also get some graphical character, looks like a l, and I don't want it!

// Anders


---
Thought I could organise freedom
how Scandinavian of me

Jason Teagle
October 7th, 1999, 05:52 AM
You haven't set your edit control to multiline...

PadmaV
October 7th, 1999, 03:33 PM
when you are working with edit controls
new line character is "\r\n" not just"\n"
try using "\r\n" wherever you need newline.

Hope it helps.




padma