|Type||Topic||Plugin||Version||macOS||Windows||Linux||Console & Web||iOS|
|class||Drag & Drop||MBS Win Plugin||10.5||No||Yes||No||Yes, Windows only||No|
It contains methods used in any application that can be a target for data during a drag-and-drop operation. A drop-target application is responsible for:
- Determining the effect of the drop on the target application.
- Incorporating any valid dropped data when the drop occurs.
- Communicating target feedback to the source so the source application can provide appropriate visual feedback such as setting the cursor.
- Implementing drag scrolling.
- Registering and revoking its application windows as drop targets.
The WindowsDropTargetMBS class contains methods that handle all these responsibilities except registering and revoking the application window as a drop target, for which you must call the AttachToWindow functions.
When To Implement
Implement the WindowsDropTargetMBS interface if you are developing an application that can act as a target for a drag-and-drop operation. The WindowsDropTargetMBS interface is associated with your application windows and is implemented on your window objects. Call the AttachToWindow function to register your window objects as drop targets.
When To Use
You do not call the methods of WindowsDropTargetMBS directly. The DoDragDrop function calls the WindowsDropTargetMBS methods during the drag-and-drop operation.
For example, DoDragDrop calls WindowsDropTargetMBS.DragEnter when it detects the mouse has moved over a window that is registered as a drag target. After the mouse has entered a drag-target window, DoDragDrop calls WindowsDropTargetMBS.DragOver as the mouse moves through the window and calls WindowsDropTargetMBS.DragLeave if the mouse leaves the target window or if the user cancels or completes the drag-and-drop operation. DoDragDrop calls WindowsDropTargetMBS.Drop if the drop finally occurs.
To see the ghost picture of the drag, please register a WindowsDragSourceMBS for the same window.
While the drag classes compile for Web Edition, they run on the server, so they have no effect on the client browser!
- 4 events
- event DragEnter(dataObject as WinDataObjectMBS, keystate as Integer, x as Integer, y as Integer, byref effect as Integer) as Integer
- event DragLeave as Integer
- event DragOver(keystate as Integer, x as Integer, y as Integer, byref effect as Integer) as Integer
- event Drop(dataObject as WinDataObjectMBS, keystate as Integer, x as Integer, y as Integer, byref effect as Integer) as Integer
- 2 properties
- 2 methods
- 17 constants
- const DROPEFFECT_COPY = 1
- const DROPEFFECT_LINK = 4
- const DROPEFFECT_MOVE = 2
- const DROPEFFECT_NONE = 0
- const DROPEFFECT_SCROLL = &h80000000
- const E_INVALIDARG = &h80070057
- const E_OUTOFMEMORY = &h80000002
- const E_UNEXPECTED = &h8000FFFF
- const MK_CONTROL = 8
- const MK_LBUTTON = 1
- const MK_MBUTTON = &h10
- const MK_RBUTTON = 2
- const MK_SHIFT = 4
- const MK_XBUTTON1 = &h20
- const MK_XBUTTON2 = &h40
- const S_FALSE = 1
- const S_OK = 0
This class has no sub classes.
Some examples which use this class:
- /Win/Drag and Drop/Attachment Drop from Outlook
- /Win/Drag and Drop/File Drag Multi
- /Win/Drag and Drop/File Drop
- /Win/Drag and Drop/Picture Drop
- /Win/Drag and Drop/Picture Drop on control
- /Win/Drag and Drop/Text Drop
The items on this page are in the following plugins: MBS Win Plugin.
MBS FileMaker Plugins