Move object between panels using drag and drop

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • siilexx
    New Member
    • Aug 2010
    • 19

    Move object between panels using drag and drop

    Hello,

    I'm trying to write an application which will allow the user to move objects such as Labels between different Panels.

    I've managed to move the objects in one panel (using MouseDown/MouseUp/MouseMove) but cannot drop the object to another panel. The objects actually stays bound to it's original owner's form.

    The "Panel.DragEnte r" only accept objects from outside the application (text files, pictures...)

    Could you please advise ?

    Thanks in advance
  • Christian Binder
    Recognized Expert New Member
    • Jan 2008
    • 218

    #2
    How did you achieve your Drag&Drop-behavior? You have to call DoDragDrop of the control, e.g. Form.

    Maybe you could post some of your codings?

    Comment

    • siilexx
      New Member
      • Aug 2010
      • 19

      #3
      Hello,

      I'm using myPanel.Control s.Add(myLabel) instead of drag and drop function.
      I will try again with DoDragDrop.

      Comment

      • siilexx
        New Member
        • Aug 2010
        • 19

        #4
        Actually I'm trying to build some kind of weekly agenda, including tasks and rendez-vous management as outlook does, and I'm using one panel for each day, but this doesn't seem to be the best way of working...
        Do you have some experience in this kind of program ? Which kind of controls should I preferably use ?

        Thank you

        Comment

        • peochei
          New Member
          • Oct 2010
          • 12

          #5
          Maybe you can use some samples? There are some ready controls:
          1. http://www.codeproject.com/KB/docvie...endarView.aspx - pretty nice, LGPL licence,
          2. http://www.codeproject.com/KB/select...ardayview.aspx

          I guess there are some more.

          Comment

          Working...