Create stretching slate scrollbox in a toolkit?

I try to create a scroll box which takes all vertical space of a toolkit (like the scroll box in the Mesh Paint mode).

Here is my problem:

  • if I don’t set the height of the scroll box, it stretches as long as it needs, leading to a scroll box larger than the toolkit, with no scroll bar.
  • if I set a maximum height, the scroll box works (with a scroll bar), but it does not stretch to take the entire toolkit height.

How should I do this?