ShellBrowser Delphi Components Documentation
|
Allows you to prevent unwanted shell drops.
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 TJamShellList, if the objects have been dropped on the background.
The following example will prevent a drag and drop operation, if the objects were dropped on the background of a TJamShellList:
procedure TMainForm.ShellListBeforeShellDrop(sender, DropTarget: TObject; DroppedFiles: TStrings; var ExecuteDrop: Boolean); begin if DropTarget is JamShellList then ExecuteDrop := False; end;