[SOLVED. Not a bug] - FlexBox-inside-FlexBox: A possible bug?


#1

I have a component which has a flexbox which manages a varying number of “row” components - each itself having its own FlexBox which manages one or more horizontally laid-out controls - button-panels if you will.

Without going into details - after reflection I dont feel Grid is best for my needs on this particular task.

The rows themselves hold a reference to a flexitem managed by their master - laid out in column-mode.

Each panel is just a JUCE button centred in the panel ( using relative co-ordinates ) on a differently coloured background.

I have repurposed and moved all the JuceDemo type FlexBox Group-Box options outside of my components so I can play around with all the different flexbox parameters for laying out BOTH the row flexitems and the button-panel flexitems. But no matter how I vary options- I cannot get lines of buttons to appear in rows as I intend.

What i am finding when I lay out - say three rows, ie three instances of my RowComponent of my button-panels is that the first row appears just how I want but on subsequent rows the buttons mostly don’t appear at all - or in a few cases when I mess with flexbox parameters, a few of the buttons on the second row can be made to appear - but not in the right positions, being only partly displayed.

Has anyone else done something like this ? FlexBox controlling several rows of Flexitems - in components holding individual flexboxes which themselves manage a horizontal line of flexitems ? ?


#2

As so often happens - after days of frustrations - I eventually post a problem on the forum…

… only to find that I manage to fix it myself soon after…

I’d wrongly associated the flexItem managing the rowComponent to the rowComponents’ own FlexBox which manages the rowComponetns buttonPanels .

removed that line of code and everything worked fine…

Gaaaaaah !!!


#3

Glad we could help :wink: