I’ve started to play with the Grid class recently, and I discovered a possible feature that would be great to have to make the class more flexible and enable building nested Grids. If some approach already exist I would be happy to learn it.
So basically for now, the only way you can build a nested grid is to create an empty component, pass it as an item to the grid, and then take the bounds of that component to performLayout of your inner grid. Since in my opinion this is an overkill, it would be great to be able to pass a Rectangle to a grid item, or even better, another grid.
Please let me know if you find that this could be helpful or if there are already any alternative approaches. Thanks
Edit: I just discovered another possible approach by adding an item with no component associated, and then getting the item currentBounds from the grid item array, although this method could probably be simplified by adding the above requested feature to the class.
Nice! I am currently working on my own implementation, it could probably be much better if I instead hacked the Juce Module, but I prefered to keep it separate, here it is in case anyone is interested.
Grid implementation to facilitate nested grids, and rectangles as item: