PERFORM-DRAG-DROP Action

#### Search Results

Search

# PERFORM-DRAG-DROP Action

This document covers the following topics:

- Description

- Parameters

## Description

Manually initiates a drag-drop operation.

Calling this action is not necessary for dialog elements supporting automatic drag-drop (e.g., list box controls). In this case, Natural initiates a drag operation automatically in response to the relevant user actions. Regardless of whether the drag-drop operation is initiated automatically or manually (via this action), the drag source control must have a DRAG-MODE attribute value other than the default value of DM-NONE in order for the drag-drop operation to be successfully started.

The drag source receives a BEGIN-DRAG event when the drag operation begins, and an END-DRAG event when the drag operation ends (either with or without a drop having occurred). The drag operation occurs optionally either immediately or after the cursor is moved a system-defined minimum threshold distance of typically a few pixels. In the latter case, no BEGIN-DRAG or END-DRAG event is received by the drag source if the operation is cancelled (e.g. by releasing the mouse button that was depressed on calling this action) before the cursor movement threshold has been reached, and no drag cursor is displayed.

The drag source must respond to the BEGIN-DRAG event by placing some data on the drag-drop clipboard using the SET-CLIPBOARD-DATA action, otherwise the drag-drop operation is implicitly cancelled by Natural.

Note that this action is, in practice, currently limited to ActiveX controls, as only these controls (sometimes) support the primitive mouse button events that are appropriate for calling this action.

## Parameters

Name/Data Type | Explanation
--- | ---
HANDLE OF GUI | Input Handle of dialog element which is to act as the drag source (and thus receive the BEGIN-DRAG and END-DRAG events, if any).
Immediate (L) | Input (optional parameter) Indicates whether the drag-drop operation should occur immediately or after the cursor moves a system-defined minimum threshold distance (=default).
Response (I4) | Output Natural error (if applicable).

#### Example:

    PROCESS GUI ACTION PERFORM-DRAG-DROP
    GIVING *ERROR

### On this page

- Description
- Parameters