Word wrap


17-10-2009 22:30:57

Hi everyone, I'd like to get word wrap working on a StaticText variable... I already have my own background widget (StaticImage) so I don't want to use scrollbars... I don't really need the scrolling, but I would like word wrap.

I'm a bit lost, how do I apply word wrap to a fairly small StaticText box?


19-10-2009 05:43:11

use Edit in WordWrap mode.

StaticImage* image = Gui::getInstance().createWidget<StaticImage>("StaticImage", IntCoord(10, 10 100, 100), Align::Default, "Overlapped");

Edit* edit = image->createWidget<Edit>("WordWrap", IntCoord(0, 0 image->getWidth(), image->getHeight()), Align::Stretch);