CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2001
    Posts
    4

    URGENT: Integrate Drag-Drop with AddItem method ?

    I need to complete an exercise which requires me to create an "basketBall Assignments" interface which allows name of a new player to be typed and then drag-drop a person's name on scrollable list (either Team 1 or Team 2). The form has 3 label controls, 1 textbox, and 2 simple listbox controls. I have created the interface but I don't know what to write for the code.... please help !!!!!!

    THANK YOU SO MUCH !!


  2. #2
    Join Date
    Jun 2001
    Location
    MO, USA
    Posts
    2,868

    Re: URGENT: Integrate Drag-Drop with AddItem method ?

    Change the DragMode property of the textbox to Automatic and add this code. (You might also want to set the DragIcon property of the textbox...)


    option Explicit

    private Sub List1_DragDrop(Source as Control, X as Single, Y as Single)
    List1.AddItem Source.Text
    End Sub

    private Sub List2_DragDrop(Source as Control, X as Single, Y as Single)
    List2.AddItem Source.Text
    End Sub






  3. #3
    Join Date
    Sep 2001
    Posts
    4

    Re: URGENT: Integrate Drag-Drop with AddItem method ?

    THANK YOU !!!


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

Featured