Results 1 to 2 of 2

Thread: Urgent!! Listbox drag and drop

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2000
    Posts
    85

    Question

    I'm trying to set up the drap and drop option between 2 listboxes and it will not work. When you click on it the icon changes and it looks like it is going to drag, but it will not drop anywhere. The main purpose of this is to be able to drag the files instead of having to select the text and then click add.

  2. #2
    Fanatic Member
    Join Date
    Mar 2000
    Location
    That posh bit of England known as Buckinghamshire
    Posts
    658
    List 1 is the list box that things will be dragged from.
    List 2 is the list to drop things on.

    Code:
    'set these properties at design time, or in code somewhere
    List1.OLEDragMode = 1
    List2.OLEDropMode = 1
    
    'this adds the draged item to the list
    Private Sub List2_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single)
        List2.AddItem Data.GetData(1)
    End Sub
    Iain, thats with an i by the way!

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