Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old


Attaches a new drop area to the window.

Component Version macOS Windows Linux Server iOS SDK
DragDrop 11.0 ✅ Yes ✅ Yes ❌ No ❌ No ❌ No
MBS( "DragDrop.AttachToWindow"; WindowRef )   More


Parameter Description Example
WindowRef Window Reference is the unique OS level window ID. You can obtain this by using the Window.FindByTitle or Window.FindByIndex functions. Pass zero to access the frontmost window. 0


Returns overlay reference number or error.


Attaches a new drop area to the window.
This disables FileMaker's drop handler and installs the plugin one to the window.
You can't assign a picture or change position on Windows.

On MacOS calls DragDrop.CreateWithWindow internally.
You may need to release via DragDrop.Release later, especially when switching layouts.


Attach to window of the FileMaker solution:

# SetupDrop attach in file DragTest drag

# let FileMaker build the layout
Pause/Resume Script [ Duration (seconds): ,1 ]
# now add our control
Set Variable [ $$dropview ; Value: MBS("DragDrop.AttachToWindow"; Get(WindowName) ) ]
Set Variable [ $result ; Value: MBS( "DragDrop.RegisterDropTypes"; $$dropview; "file") ]
Set Variable [ $result ; Value: MBS( "DragDrop.SetDragActionHandler"; $$dropview; Get ( FileName ); "DragAction") ]
Set Variable [ $result ; Value: MBS( "DragDrop.SetCursor"; $$dropview; 1) ]

See also

Release notes

Example Databases

Blog Entries

This function checks for a license.

Created 25th November 2020, last changed 29th June 2024

DragDrop.AttachToOverlay - DragDrop.ClearDragActionHandler