ShellBrowser Delphi Components Documentation
ContentsIndexHome
PreviousUpNext
ShellControls.TJamShellTree.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 is of type TTreeNode and supplies the node in the TJamShellTree, on which the objects have been dropped.

The following example will inform the user, which files haven been dropped on which folder:

procedure TMainForm.ShellTreeBeforeShellDrop(sender, DropTarget: TObject;
DroppedFiles: TStrings; var ExecuteDrop: Boolean);
begin
ShowMessage('The file(s) ' + DroppedFiles.Text + ' have been dropped on '+ ShellTree.GetFullPath(DropTarget as TJamShellTreeNode));
end;