Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
DragDrop.AttachToWindow
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
Parameters
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 |
Result
Returns overlay reference number or error.
Description
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.
Be sure to release this when leaving layout or switching to a different window mode. Otherwise you can't drag & drop controls within the layout editor.
Examples
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
- DragDrop.CreateWithWindow
- DragDrop.RegisterDropTypes
- DragDrop.Release
- DragDrop.SetCursor
- DragDrop.SetDragActionHandler
- DragDrop.SetFilePathsToDrag
- VersionAutoUpdate
- Window.FindByIndex
- Window.FindByTitle
Release notes
- Version 11.2
- Deprecated DragDrop.CreateWithWindow in favor of DragDrop.AttachToWindow function.
- Version 11.0
- Added DragDrop.AttachToWindow function to allow drop to whole window on Windows.
Example Databases
Blog Entries
- MBS FileMaker Plugin, version 11.2pr4
- Seven things to add to your FileMaker solution today with MBS Plugin
- New in MBS FileMaker Plugin 11.0
- Neues MBS FileMaker Plugin 11.0
- MBS FileMaker Plugin 11.0 - More than 6400 Functions In One Plugin
- MBS FileMaker Plugin, version 10.6pr1
This function checks for a license.
Created 25th November 2020, last changed 20th January 2025
