StretchableLayoutResizerBars


#1

are you allowed more than one in a StretchableLayoutManager usage?

like…

[component]
-----bar-----
[component]
-----bar-----
[component]

my plan was a component with an add(Component*) method that dynamically adds a resizerbar inbetween the new component and the last one added.

all three (say) components show fine, but the second resizer i cant see!

like…

[component]
-----bar-----
[component]
[component]

have i just ballsed up somewhere?


#2

yep of course, are you sure you allocating a item space for it ? i’ve had the same problem a while ago when i’ve implemented the dockable panel…
remember that using more than one resizer bar could lead to rounding off errors (so sometimes they not cover the whole area).

i’ve done some test here, maybe this could give you a hand:

juce_Dockable.zip

lucio


#3

as usual whenever i post here, its a silly problem.

the numComponents parameter in layoutComponents() was still hardcoded as 3 from when the class wasn’t dynamic.

DOH!

:mrgreen:


#4