Custom bounds using ComponentDragger and ComponentBoundsConstrainer

I’ve noticed this asked a few times in the past but still can’t seem to find an answer.

When using the ComponentDragger::dragComponent method, is it possible to use the ComponentBoundsConstrainer parameter to set a custom bounding rectangle to constrain within? The ComponentBoundsConstrainer documentation only seems to suggest that it can be used to keep a component within the bounds of the parent component or to keep it on screen.

Have you found an answer to this?
I’m wondering the same thing.

Ok. found it.
Just need to call setMinimumOnscreenAmounts()

constrainer = new ComponentBoundsConstrainer();
constrainer->setMinimumOnscreenAmounts(15, 15, 15, 15);