|
-
Oct 27th, 2002, 10:36 PM
#1
Thread Starter
New Member
Drag and drop
i'm facing some problems in drag and drop operations.
i want to drag listview item from listview and drop it at a panel.
how do i do it? i tried searching the net but to no avail.
can anyone help me?
-
Oct 27th, 2002, 11:07 PM
#2
PowerPoster
-
Oct 29th, 2002, 11:45 PM
#3
Thread Starter
New Member
thanks. i already got that reference earlier. however, the following is the code that i have written. i can't seem to frop it on the panel. most probably my code is wrong....here is the code:
'when the list view item is dragged
Private Sub lvwType_ItemDrag(ByVal sender As Object, ByVal e As System.Windows.Forms.ItemDragEventArgs) Handles lvwType.ItemDrag
DoDragDrop(e.Item, DragDropEffects.Move)
End Sub
'when the list view item is dropped
Private Sub lvwType_DragEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles lvwType.DragEnter, Panel.DragEnter
e.Effect = DragDropEffects.Move
End Sub
'the whole drag drop process
Private Sub lvwType_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles lvwType.DragDrop, Panel.DragDrop
'the following is what i have written so far, but it can't seem to work:
Panel.Controls.Add(e.Data.GetData("System.Windows.Forms.ListViewItem")
'can anyone help?
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
|