You can loop over your array and then call AddSlot() on the SWrapBox instance. This will do the same thing as +SWrapBox::Slot() would do when using the Slate declarative syntax.
TSharedRef<SWrapBox> WrapBox = SNew(SWrapBox);
for(const auto& Item : YourArray)
{
WrapBox->AddSlot()
[
/** Add your widget here */
];
}
Hello everyone, i have a question about slate. There are two widgets: Uniform Grid Panels, Wrap Boxes. i know that
through +SWrapBox::Slot() i can add items inside of this widget, but i need to add them through loop of array, but i have no clue how to do it. So if anybody knows how to do it, please help