Drag-Drop Event

This document covers the following topics:


Applies To

Dialog, ActiveX Controls, Bitmap Control, Control Box Control, Edit Area Control, List Box Control, List View Control, Tree View Control.

Description

If not suppressed, this event is received by the drop target (if any) under the drag-cursor when a drop occurs during a drag-drop operation.

Natural supports two types of drag-drop operation. The older mechanism is used exclusively for drag-drop operations between two bitmap controls within the same dialog. The newer, OLE-based, mechanism is more general and supports any of the above control types as drop targets (see the DROP-MODE attribute). The latter mechanism is much more powerful than the former, which has been retained only in order to maintain compatibility with earlier Natural versions. In both cases, the application typically responds to this event by first calling the INQ-DRAG-DROP action to find out more information about the drop (e.g., where the drop occurred within the dialog or dialog element, the type of drop operation performed, etc.).

In the case of OLE-based drag-drop, the application then calls the GET-CLIPBOARD-DATA action to retrive the dragged data from the drag-drop clipboard.

In the case of non-OLE drag-drop, the application should delete the source data (obtained directly via the source control handle returned by the INQ-DRAG-DROP action, since the drag-drop clipboard is not used in this case).

Note:
For OLE drag-drop, the deletion of the source data is done in the END-DRAG event by the drag source instead.