MultiLineEditBox Text formating

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

User avatar
Just popping in
Just popping in
Posts: 20
Joined: Wed Jun 20, 2007 14:50

MultiLineEditBox Text formating

Postby fezztah » Fri Mar 14, 2008 11:49

I'm using a read only MEB to display a few hundred words of text. When this GUI displays I grab a number of paragraphs of text and pump them into a string seperated by CR/LF. So I end up with 3 or 4 line separated paragraphs of text in my MEB.

When I first display it I get a vertical scroll bar (ok) and a horizontal scroll bar (bad) and the text doesn't look properly formatted. On subsequent displays the horizontal scroll bar disappears and everything looks nicely formatted.

I know MEB's are pre-formatted and it looked like I was missing some kind of "please reformat yourself now" call, but I didn't see one. I added a second call to setText and that seemed to fix it, but I thought I'd mention it as that can't be right.

Code: Select all

string text;
for each paragraph
   text += paragraph
   text += CR + LF
MEB->setText(text)    //without this the MEB sometimes looks wrong

User avatar
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England

Postby CrazyEddie » Fri Mar 14, 2008 18:34


Thanks for the heads-up, I'll check it out and add a mantis item as needed.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 16 guests