Thanks Nick,
Dragging is now working, my only problem now is sometimes when I move my
mouse a bit quick, it seems that the icon is not appearing. Is that normal
or I need to insert some code/control to be able to show the drag icon even
if I move my cursor so quick during drag?
Renel
>>Hi,
>>
>>How can I use the drag inside the grid? Let say, I have a grid and
>>my field1 is itemcode and field2 is desc. Then, during the display
>>I want to drag the item inside the grid to another object/textbox,
>>how can I do that?
>>
>>Thanks,
>>Renel
>
>Hello Renel,
>
>I can tell the trick I used to do that, but in my case I drag to the object outside the grid.
>Because of some grid quirks I do not use Drag on the grid object (say grid.column1.textbox1) Instead, I have invisible Label object (say lblDrag) on the form and actually move that one, using grid events. lblDrag has corresponding DragIcon picture assigned to it.
>You can try to modify this approach according to your needs.
>
>So the events are:
>
>*grid1.Column1.Text1.MouseDown()
>LPARAMETERS nButton, nShift, nXCoord, nYCoord
>* assign your itemcode to lblDrag property for further use
>thisform.lblDrag.Tag = myTable.itemcode
>NODEFAULT
>
>*grid1.Column1.Text1.MouseMove()
>LPARAMETERS nButton, nShift, nXCoord, nYCoord
>NODEFAULT
>
>*grid1.MouseMove()
>LPARAMETERS nButton, nShift, nXCoord, nYCoord
>WITH Thisform
> IF nButton = 1
> * first we move the lblDrag to the point where mouse was clicked
> This.Parent.lblDrag.Left = nXCoord
> This.Parent.lblDrag.Top = nYCoord
> This.Parent.lblDrag.Drag()
> ENDIF
>ENDWITH
>
>
>HTH,
>
>Nick