I’ve had FlexBox working before but have become incompetent since then …
Here’s a simple use that does fuck all: Can someone tell me what I have to do to get my items to actually layout on the screen from here with some arbitrary layout of your choice?
void MainContentComponent::resized()
{
FlexBox flex;
for (auto b : buttons)
{
FlexItem item{ *b };
flex.items.add(item);
}
flex.performLayout(getLocalBounds().reduced(10).withHeight(25));
}
Or set the flexGrow value for your “item”, I tend to set it to 1 which makes every item take up the same amount of space
But you could set your first item to have flexGrow 2 and then the rest 1 and the first item would take up twice as much space as all of the other items