From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!

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.


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

The Action parameter specifies the type of drag action.


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