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

DragDrop.AttachToOverlay

Attaches a new drop area to the overlay.

Component Version macOS Windows Linux Server iOS SDK
DragDrop 14.3 ✅ Yes ✅ Yes ❌ No ❌ No ❌ No
MBS( "DragDrop.AttachToOverlay"; OverlayRef )   More

Parameters

Parameter Description Example
OverlayRef The overlay window reference number. $overlay

Result

Returns overlay reference number or error.

Description

Attaches a new drop area to the overlay.
You may need to release via DragDrop.Release later, especially when switching layouts.

Examples

Create an overlay to accept files by drag and drop:

# we create the overlay first
Set Variable [ $overlay ; Value: MBS("Overlay.Create") ]
Set Variable [ $r ; Value: MBS("Overlay.SetFrame"; $overlay; 100; 100; 200; 200) ]
Set Variable [ $r ; Value: MBS("Overlay.SetImage"; $overlay; DragTest::DropLogo) ]
Set Variable [ $r ; Value: MBS("Overlay.SetVisible"; $overlay; 1) ]
# we allow user to move the logo
Set Variable [ $r ; Value: MBS("Overlay.SetMovableByWindowBackground"; $overlay; 1) ]
# now add our drop zone to the overlay
Set Variable [ $$dropview ; Value: MBS("DragDrop.AttachToOverlay"; $overlay) ]
Set Variable [ $result ; Value: MBS( "DragDrop.RegisterDropTypes"; $$dropview; "file,rtf,text,html") ]
Set Variable [ $result ; Value: MBS( "DragDrop.SetDragActionHandler"; $$dropview; "DragTest.fmp12"; "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 29th June 2024, last changed 29th June 2024


DocumentPicker.SetTrigger - DragDrop.AttachToWindow