I have a little question about Wt. When I create WText (child of a WContainerWidget and having a long long text), Scrollbars are not created for this WText. I have tried many things like setting overflow (with setOverflow function of WContainerWidget), putting this text class into WScrollArea and etc..
If you have some kind of opinions about that problem, I would be glad.
Thanks everyone by now. Mustafa
Edit: Code example
MyApplication::MyApplication(Wt::WEnvironment const &env)
: Wt::WApplication(env)
{
std::string str = "..." // a very long html string
auto text = new Wt::WText(str, Wt::XHTMLUnsafeText);
root()->setOverflow(OverflowAuto);
root()->addWidget(text);
}
You could use a
Wt::WTextArea
instead ofWText
, if its a large file. Its scrollable.