DesktopUIControl.DragEnter

From Xojo Documentation

Event


DesktopUIControl.DragEnter(obj as DragItem, Action as DragItem.Types) As Boolean

New in 2021r3

Supported for all project types and targets.

Fires when the passed DragItem enters the DesktopUIControl.

Notes

Returns a Boolean. Return True from this event to prevent the drop from occurring.

The Action parameter specifies the type of drag action.

Examples

To restrict file drops to just folders (and not files), you can put this code in the DragEnter event:

If Not obj.FolderItem.IsFolder Then Return True