Custom grid with variable cell width


I need to create a table with cells of different width. Cells are all the same height, but resizable by width. Cells could be rearranged by dragging and inserting between the other cells. Something like that:

What are the appropriate JUCE classes to start with? Is FlexBox a good option?
Thank you!

Might be better to use a juce::Grid? (which is basically the same as a the new HTML/CSS grid)

@jules cool, thanks for the answer. Is it easy to rearrange a grid? Say it was 3x4, but I want to make it 6x2 (same number of cells)?

I’m new to JUCE, very impressed by the framework. Big thanks for putting it all together! @jules :+1:

TBH I don’t really understand how the Grid class works (someone else implemented it, and I’ve never used a HTML grid control myself), but I assume that if it’s the standard way things are now done on the web, the underlying structure must be capable of stuff like that.

But just like the web version, this is purely a layout tool, it doesn’t actually implement anything interactive like resizing or dragging, you’d need to create your own custom components to put into it that do that.

Thanks, I understand about the user actions. Grid seems nice, will give it a shot.

Did you find a solution to this? I also require something very similar!

No, I’ve switched to other projects.

1 Like