Carriage return in a string defined with an XML layout

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

wetneb
Just popping in
Just popping in
Posts: 1
Joined: Wed May 06, 2009 19:46

Carriage return in a string defined with an XML layout

Postby wetneb » Wed May 06, 2009 19:56

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

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

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

Postby Jamarr » Wed May 06, 2009 20:32

press "enter" (or "return") on your F***ing keyboard. :wink:
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!

earthsruler
Quite a regular
Quite a regular
Posts: 74
Joined: Mon Apr 28, 2008 23:21
Location: Australia

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

Postby earthsruler » Fri May 15, 2009 01:00

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 '\'.

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

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

Postby Jamarr » Fri May 15, 2009 15:47

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:
If somebody helps you by replying to your thread, upvote him/her as a thanks! Make sure to include your CEGUI.log and everything you tried when posting! And remember that we are not magicians!


Return to “Help”

Who is online

Users browsing this forum: No registered users and 16 guests