ResizableBorder for two adjacent components?

Hi,

I need some kind of ResizableBorder between two adjacent components so when I drag the border, it enlarges the one component and automatically shrinks the other by the same amount.

Before building my own, maybe someone is aware of some class in Juce?

Thanks
Stefan

Maybe I’ve misunderstood your needs, but it seems there are a couple of ways to accomplish your spec. In the DemoRunner FontsDemo.h sources, there is an example of using a verticalDividerBar (StretchableLayoutResizerBar) to separate the boundaries of different components, note the resize() methods’ delegation of layout to verticalLayout (StretchableLayoutManager) … which may, or may not be what you want, i.e. see also FlexBoxDemo.h which provides a much more sophisticated component layout mechanism.

2 Likes

StretchableLayoutResizerBar and StretchableLayoutManager was exactly what I was looking for!! I’ve searched through the whole Demo Runner and obviously overlooked that thing in the Fonts Demo.

Thanks so much.

cheers
Stefan

No worries, happy to help …