Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Darg and drop in ElShelllist boxes.

Cant seem to get drag and drop to work between 2 ElShellist boxes.  Just get the circle with line through it.  Any ideas.  Im trying to make a double explorer so I can easily transfer files from one folder to the other.  I can program a trasnsfer but I would rather drag a file into the other box.


  • 4 Comments sorted by Votes Date Added
  • No special drag support is implemented in TElShellList. Base class provides features for generic Delphi or OLE drag, which are controlled via the following properties and events:

    DragAllowed (should be True)
    DragType (Delphi or OLE)
    OnDragOver, OnDragDrop (standard events)
    OnOleTargetDrag, OnOleTargetDrop, OnOleDragStart, OnOleDragFinish (for OLE drag)

    So, you see mentioned cursor because you does not handle OnDragOver (or OnOleTargetDrag for OLE drag) event. Also, you have to handle OnDragDrop (OnOleTargetDrop for OLE) event, in which real copy/move action should be implemented.
  • Drag allowed set to true drag type set to Delphi in both elshelllist boxes.  Never gets to ondragover,  ondragdrop or onenddrag standard events.  You get the circle with line through while dragging and when you let go over the second box nothing happens.  I set up the events to give me a screen message - nothing is shown.
  • edited January 2020 Posts: 0 Accepted Answer Vote Up0Vote Down
    OnDragOver works at my side:

    procedure TForm1.ElShellList1DragOver(Sender, Source: TObject; X, Y: Integer;
      State: TDragState; var Accept: Boolean);
      Accept := True;
  • So it does now - strange - I swear it didn't before.   That will work.  The other 2 events still give me no results but dragover will be useful if it stays consistent.  Thanks.
Sign In or Register to comment.