# AG\_DRAGDROP

> [HTML Version](ag_dragdrop.htm)

_Reviewed and revised December 2023_

**tab(-10, AG\_DRAGDROP); opcode, ctlid \{,fidx\}; chr(127);**     [Tab(-10,x) Syntax Notes](ag_xxx_syntax-notes.md)

AG\_DRAGDROP (112) implements both destructive and non-destructive drag-drop modes. 

This function has both a [subroutine and a print tab implementation](subroutine-print-pairs.md).

**Parameters**

_opcode_

| **Value** | **Description** |
|------|------|
| 0 | query drop buffer, set status parameter to the number of files in the drop target (ctlid) |
| 1 | retrieve fspec corresponding to fidx from the specified drop target (ctlid) |
| 2 | clear the contents of the drop target buffer |
| 3 | set non-destructive (previous "asynchronous") mode |


_ctlid_

_control ID of the target control_

**Response**

_status, fspec_ CR

_status_ values:  <=0 indicates failure, or no files available in opcode 0; >0 indicates success (number of files for _opcode_ 0 or the number of bytes in _fspec_ for _opcode_ 1)

_fspec_ is the file specification in opcode 1

See [MX\_DRAGDROP](mx_dragdrop.md)[xs](keyword-types.md) for additional details and parameters. 