# StretchableLayoutManager

**URL:** <https://forum.juce.com/t/stretchablelayoutmanager/5893>\
**Category:** General JUCE discussion\
**Created:** [November 15, 2010, 8:19pm UTC](https://forum.juce.com/t/stretchablelayoutmanager/5893 "2010-11-15T20:19:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![haydxn](https://avatars.discourse-cdn.com/v4/letter/h/5fc32e/32.png) [@haydxn](https://forum.juce.com/u/haydxn)\
**Post date:** [November 15, 2010, 8:19pm UTC](https://forum.juce.com/t/stretchablelayoutmanager/5893/1 "2010-11-15T20:19:23Z")

</div>

I imagine this class hasn’t been touched for a thousand years! I have a small request;

Any chance of a new layOutComponents() function that takes a more modern input? It’s like there’s a nipple on show - the rest of the library’s nipples are all covered up, but this function brazenly demands an olde-worlde array! 😮 some of juce’s darker corners are full of spiders 😮 😮

---

<div class="post-metadata">

**Author:** ![haydxn](https://avatars.discourse-cdn.com/v4/letter/h/5fc32e/32.png) [@haydxn](https://forum.juce.com/u/haydxn)\
**Post date:** [November 15, 2010, 8:44pm UTC](https://forum.juce.com/t/stretchablelayoutmanager/5893/2 "2010-11-15T20:44:31Z")

</div>

Alternatively (if you don’t agree with taking, say, a const Array\<Component\*\>& input, it’d probably be enough to just add a note to the docs that suggests using a HeapBlock\<Component\*\> for generating the passing parameter.

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [November 16, 2010, 9:12am UTC](https://forum.juce.com/t/stretchablelayoutmanager/5893/3 "2010-11-16T09:12:37Z")

</div>

True, that’s quite an ancient class! But I don’t particularly dislike its use of a raw array… Whenever I’ve used it, I’ve always needed to call it with a constant set of objects, so passing a const array seems pretty sensible. I take your point though, it does look a bit old-fashioned these days, I’ll have a look at it next time I’m doing a bit of spring-cleaning!

---

<div class="post-metadata">

**Author:** ![haydxn](https://avatars.discourse-cdn.com/v4/letter/h/5fc32e/32.png) [@haydxn](https://forum.juce.com/u/haydxn)\
**Post date:** [November 16, 2010, 9:36am UTC](https://forum.juce.com/t/stretchablelayoutmanager/5893/4 "2010-11-16T09:36:01Z")

</div>

I was trying to use it for a dynamic list of timelines (so had alternating bars), but it turned out it didn’t really work in the way I expected it to anyway. I didn’t want the decision-making part of it (so stretching one should only affect the positions of those after it, and not resize any but one). In the end I made a new list class, where each item is held in a container component with a bottom-only resizable border component; resizing one updates the positions of the containers below it. Works a treat. (just posting that in case it proves to be a useful suggestion to anyone else 🙂 )
