Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 11.2   11.3   11.4   11.5   12.0   12.1   12.2   12.3   12.4   12.5    Statistic    FMM    Blog  


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 OK 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

Created 25th November 2020, last changed 19th January 2021

DocumentPicker.SetTrigger - DragDrop.ClearDragActionHandler

Feedback: Report problem or ask question.

Start Chat