Page 1 of 1

Carriage return in a string defined with an XML layout

Posted: Wed May 06, 2009 19:56
by wetneb
Hi all,

I hope this topic hasn't been already discussed, I searched in the forum and I Read The F***ing Manual before posting here :) .
I'm using a MultiLineEditbox widget in a window defined by a .layout file. I use the Text property to define a default text, but I don't know how to add a carriage return in this text. I tried with '\n' but it doesn't work.

Thanks in advance for any answer,

Wetneb

Re: Carriage return in a string defined with an XML layout

Posted: Wed May 06, 2009 20:32
by Jamarr
press "enter" (or "return") on your F***ing keyboard. :wink:

Re: Carriage return in a string defined with an XML layout

Posted: Fri May 15, 2009 01:00
by earthsruler
Press "enter" (or "return") on your F***ing keyboard.


LOL! Yes "Enter" does add a new line. In plain text files '\' does not indicate an escape sequence, it is the ASCII character 92 or '\'.

Re: Carriage return in a string defined with an XML layout

Posted: Fri May 15, 2009 15:47
by Jamarr
Yeah, it is actually quite annoying. I had to figure this out myself awhile ago. Also, if you build layouts with the CELayoutEditor it will not save your newlines!!! (at least not with the prev build) :evil: