A control for resizing controls

rollout testRoll "TEST"
(
	dotNetControl label01 "label" height:150
	dotNetControl split "label" height:7
	dotNetControl label02 "label" height:150
	
	local startPos
	
	ON testRoll OPEN DO
	(
		split.text =""
		split.BorderStyle = split.BorderStyle.FixedSingle
		split.backColor = split.backColor.darkgray
	)
	
	ON split MouseMove arg DO
	(
		local cursors = dotNetClass "System.Windows.Forms.Cursors"
		(dotNetClass "System.Windows.Forms.Cursor").current = cursors.sizeNS
		IF arg.button == arg.button.left DO
		(
			local theDiff = startPos-arg.y
			IF label01.height-theDiff > 20 AND label02.height+theDiff > 20 DO
			(
				label01.height -= theDiff
				split.pos -= [0,theDiff]
				label02.height += theDiff
				label02.pos -= [0,theDiff]
			)
		)
	)
	
	ON split mouseDown arg DO
	(
		startPos = arg.y
	)
)
createDialog testRoll

This code snippet creates a rollout with a small .NET label that can be used to move/resize other controls on a rollout. It works like the splitContainer class in .NET, but this way it can be used outside a .net control, so it’s also effective for changing standard MXS controls.

I was wondering if anyone had a better/more efficient way of doing this.