|
-
December 13th, 1999, 05:15 AM
#1
ListBox drag&drop
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|