Sigal Laniado
December 13th, 1999, 04:15 AM
I have two list boxs that i can drag from one to anther. The point is that the item is inserted in the begining of the target list. I want that the item will be inserted where the user put the cursor on (in the x,y position) How can i do it?
Here is the routine:
Private Sub List1_DragDrop(Source As Control, X As Single, Y As Single)
On Local Error Resume Next
If Source Is List1 Or Source.List(Source.ListIndex) = "" Then Exit Sub
List1.AddItem Source.List(Source.ListIndex) 'Adds the item to the target
Source.RemoveItem Source.ListIndex 'Removes the item from the source
End Sub
Here is the routine:
Private Sub List1_DragDrop(Source As Control, X As Single, Y As Single)
On Local Error Resume Next
If Source Is List1 Or Source.List(Source.ListIndex) = "" Then Exit Sub
List1.AddItem Source.List(Source.ListIndex) 'Adds the item to the target
Source.RemoveItem Source.ListIndex 'Removes the item from the source
End Sub