Komponent not constrained to horizontal boundaries

As an example I have a widget containing a Komponent that spans the screen.

When I expand the widget vertically the Komponent size increases which pushes itoff the left and right edges of the screen.

How can I ensure objects do not expand past any of the 4 boundaries on widget resize?

Thanks.