>Has anyone worked out a way to drag and drop an item from a grid (or perhaps a list box) to another object (in this case another grid) so I can figure out which record it was dragged from? The grid row it is dragged TO is not important, in this case. I just wanna add items to a grid by dragging them from another grid (or something that looks and acts like that)?
>
>TIA
>
>Michael
Michael, it is not a big deal to DragDrop from Listbox since you know what is the current ListBox.Value, or DisplayValue
*Listbox.MouseMove
LPARAMETERS nButton, nShift, nXCoord, nYCoord
if nButton = 1
This.Drag()
endif
What about dragging from the grid, I actually drag not the textbox in the grid column, but invisible label on the form. Label has the proper DragIcon property.
LPARAMETERS nButton, nShift, nXCoord, nYCoord
thisform.lblDrag.tag = anyValueIwantToCarry
NODEFAULT
LPARAMETERS nButton, nShift, nXCoord, nYCoord
NODEFAULT
LPARAMETERS nButton, nShift, nXCoord, nYCoord
IF nButton = 1
Thisform.lblDrag.Left = nXCoord
Thisform.lblDrag.Top = nYCoord
Thisform.lblDrag.Drag()
ENDIF
HTH,
Nick
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison