Page 1 of 1

MultiLineEditBox Text formating

Posted: Fri Mar 14, 2008 11:49
by fezztah
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->setWordWrap(true)
MEB->setText(text)
MEB->setText(text)    //without this the MEB sometimes looks wrong

Posted: Fri Mar 14, 2008 18:34
by CrazyEddie
Hi,

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

CE.