Quick template of "DCollapsibleCategory" similiar to tool menu.

Hello.

What I’m looking for/seeking knowledge about is how to have two ‘DCollapsibleCategory’, one under the other, and the bottom one follows the bottom of the top one, similiar to the tool menu.

For example with the tool menu; when you close (collapse) the ‘Constraints’ menu, the Construction one under it comes right up underneathe it.

If anyone could make a quick template of this I would appreciate it.