Version 6.3.8 for Windows
 —  Dialog Component Reference  —

Drag-Leave 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.

Top of page

Description

If not suppressed, this event is received by the drop target (see the DROP-MODE attribute) under the drag cursor when the drag cursor leaves the area occupied by the drop target during a drag-drop operation without a drop having occurred, or if the drag-drop operation was cancelled (e.g. via pressing the Escape key).

Applications should use this event to dynamically remove any drop highlighting set in the drag-over event. For example, if the drop target is an ActiveX tree view control, the selection can be restored to the originally selected node if the selection was temporarily moved in the drag-over event to highlight the current drop position.

If drop highlighting is not used (as is usually the case if the effects of the drop are not position-dependent), this event is can be left suppressed.

Note:
For each drag-enter event it receives, a drop target receives either a drag-drop or drag-leave event (depending on whether a drop occurred or not), but not both. Therefore, some (or all) of the tasks performed in the drag-leave event may also need to be performed in the drag-drop event.

Top of page