Hi, i have a ChildWindow and i want to make it fit to the width of the HorizontalWrap, i didn't found any function to do that "automatically", here's my code :
Any idea please ?
Code Select
auto childWindow = tgui::ChildWindow::create();
auto layout = tgui::HorizontalWrap::create();
childWindow->add(layout);
auto wgt1 = tgui::Label::create("Some words");
wgt1->getRenderer()->setBackgroundColor({250,0,0});
wgt1->getRenderer()->setTextColor({0,0,0});
wgt1->setVerticalAlignment(tgui::Label::VerticalAlignment::Center);
auto wgt2 = tgui::Label::create("Another things");
wgt2->getRenderer()->setBackgroundColor({0,0,255});
wgt2->getRenderer()->setTextColor({0,0,0});
wgt2->setVerticalAlignment(tgui::Label::VerticalAlignment::Center);
layout->add(wgt1);
layout->add(wgt2);
//HERE - How to make the parent's size automatically fit its children's size ?
gui.add(childWindow);
Any idea please ?