Results 1 to 3 of 3

Thread: Drag and drop

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2002
    Posts
    3

    Unhappy 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?

  2. #2
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464

  3. #3

    Thread Starter
    New Member
    Join Date
    Jul 2002
    Posts
    3
    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
  •  



Click Here to Expand Forum to Full Width