RectControl.DragEnter

From Xojo Documentation

Event


RectControl.DragEnter(obj as DragItem,Action as Integer) As Boolean

New in 2005r5

Supported for all project types and targets.

Fires when the passed DragItem enters the RectControl.

Notes

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

The Action parameter specifies the drag action. It can take the following class constants of the DragItem class:

Value Class Constant
0 DragItem.DragActionDefault
1 DragItem.DragActionCopy
2 DragItem.DragActionMove
3 DragItem.DragActionLink

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