LPARAMETERS nButton, nShift, nXCoord, nYCoord *!* Put the shape on top so we can drag and drop on it Thisform.shpDataLocator.ZOrder( 0 ) This.Drag( 1 )and this code in the splitter shape's MouseUp()
LPARAMETERS nButton, nShift, nXCoord, nYCoord This.Drag( 2 )This code in the DragDrop() method of the two transparent shapes over the "windows in your form:
LPARAMETERS toBar, tnXCoord, tnYCoord LOCAL lnBarLeft, lnTreeWidth, lnDataContainerLeft, lnDataContainerWidth *** This will always be on a form so always lock it ThisForm.LockScreen = .T. WITH ThisForm *** Save the position of the bar's left position lnBarLeft = tnXCoord toBar.Left = lnBarLeft *** Check for minimum widths of the tree and list Thisform.CheckMinWidth( toBar, @lnBarLeft ) *** If we have altered the bar position, do it here IF lnBarLeft # toBar.Left toBar.Left = lnBarLeft ENDIF *** Calculate the Left Position of the Data Container lnDataContainerLeft = lnBarLeft + toBar.Width *** Calculate the Width of the TreeView lnTreeWidth = toBar.Left - .oTree.Left *** Calculate the Width of the Data Container lnDataContainerWidth = .Width - ( lnBarLeft + toBar.Width + 15 ) *** Now set the heights of the controls .oTree.Width = lnTreeWidth IF TYPE( 'Thisform.oDataContainer' ) = 'O' AND NOT ISNULL( Thisform.oDataContainer ) .oDataContainer.Left = lnDataContainerLeft .oDataContainer.Width = lnDataContainerWidth ENDIF ENDWITH *!* And send the data locator shape to the back again Thisform.shpDataLocator.ZOrder( 1 ) ThisForm.LockScreen = .F.