Stratching a widget/object with drag

I’m trying to create a stretch effect by dragging a dynamic panel.
Any suggestion how to approach this?