The panels get resized according to the available space in their container, not to the size of their contents.
Your panel holder itself needs to be in a fill layout panel if you want it to be resized.
I'm afraid you'll need some JS magic to adapt the size of your panel holder to its content dynamically.
thanks for your help. The problem is, that the panel holder tries to have every panel the same size, which looks pretty uncomfortable in a collapsible panel holder.
E.g. I have two panels, the first one with one line of fields, and the second one with numerous lines of fields/buttons etc. Now when I adjust the collapsibel panel holder to the size of the second panel, there will be a large blank area when I select the first panel. It would look much better if the panel holder shows the smaller panel in its original size and starts with the second panel right after the original end of the first one is reached.
#Sebastian, Were you able to find a resolution for the panel resize dynamically via Active Link. I am facing the same issue and have two panels with way too different sizes which is leaving a lot of unwanted space couple of panels. Sample would be really appreciated too.
I realize this is very old. Did you ever resolve this? If not, I can walk you through what you are trying to do. It's pretty straightforward.