Hello everybody,
I’m currently drafting a very simple layout powered by the FlexBox class, made of two columns and a resizer bar in between. I’d like to reproduce the behavior of StretchableLayoutManager and StretchableLayoutResizerBar (now dreprecated) where dragging the resizer bar changes the size of the other elements.
So far I managed to set up the FlexBox and the FlexItem’s quite easily (pseudocode):
container (FlexBox)
column1 (FlexItem: width=0, grow=1)
resizer (FlexItem: width=20, grow=0)
column2 (FlexItem: width=0, grow=1)
However I’m not sure how to make the resizer actually resize the columns. I was thinking to override its mouseDrag
method and change the width of column1, but it looks hackish. What is in your opinion the best/most JUCE-oriented way to make a dynamic layout like that with FlexBox?