[SOLVED] StaticText with long string

Marc31boss

01-03-2009 17:03:05

Hi, I'm trying to get a text in a StaticText, but it's too long, so I can't see the end. How can I do to get the end on a new line ?
Thanks.

Altren

01-03-2009 18:13:35

You mean that can get only 2048 characters and not more? By default this is max number of characters in Edit. All other characters cropped. If you want more you should use void Edit::setMaxTextLength(size_t _maxTextLength);

Marc31boss

01-03-2009 18:17:31

No, what I mean is that the text use only one line, but the window is too small to see the right part of the text

(Sorry for the poor english)

Altren

01-03-2009 18:39:42

You can use horizontal scroll. Edit::setVisibleHScroll
If you want many lines you can enable multiline mode Edit::setEditMultiLine.

Marc31boss

01-03-2009 18:47:25

I'm searching for something like setEditMultiLine, yes, but for StaticText (or something that can display some text without background, and without editing). If possible without scroll, my StaticText is enough high to display 2 or 3 lines

Altren

01-03-2009 20:01:26

Use Edit with WordWrap or WordWrapSimple (without vertical scroll bar).

Marc31boss

02-03-2009 17:09:01

It's exactly what I was looking for, thanks ;)