Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

WindowsDropTargetMBS class

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
Function: The WindowsDropTargetMBS interface is one of the interfaces you implement to provide drag-and-drop operations in your application.
Notes:
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!

Feedback, Comments & Corrections

This class has no sub classes.

Some examples which use this class:


The items on this page are in the following plugins: MBS Win Plugin.


WindowsDriveNotificationMBS   -   WindowsEthernetAdapterMBS




Links
MBS FileMaker blog