ShellBrowser Delphi Components Documentation
ContentsIndexHome
PreviousUpNext
Jam.Shell.Controls.BaseShellListView.TJamCustomFileList.OnBeforeShellDrop

Allows you to prevent unwanted shell drops.

Syntax
Pascal
property OnBeforeShellDrop: TOnBeforeShellDropEvent;

This event occurs just before a shell drop operation is executed. Set ExecuteDrop to false if you do not want the drag and drop operation to be executed. DroppedFiles contains a list of the files including their paths that have been dragged. DropTarget can either be a TListItem if the objects were dropped on a file or folder, or it can be of type TJamFileList, if the objects have been dropped on the background.

TJamCustomFileList.OnBeforeShellDrop 

TJamShellList.OnBeforeShellDrop

The following example will prevent a drag and drop operation, if the objects were dropped on the background of a JamFileList:

procedure TMainForm.FileListBeforeShellDrop(sender, DropTarget: TObject; DroppedFiles: TFilenames; var ExecuteDrop: Boolean);
begin
  if DropTarget is JamFileList then ExecuteDrop := False;
end;