BeforeDropOrPaste

<< Click to Display Table of Contents >>

 

BeforeDropOrPaste

BeforeDropOrPaste(Index, Cancel, Ctrl, Action, Data, X, Y, Effect, Shift)

Triggered immediately before a drag-and-drop operation. Usually, this occurs right after a BeforeDragOver event.

Available parameters on the BeforeDropOrPaste event

Name

Description

Index

Indicates a page index, in a multi-page object, that is affected by the operation that generated this event. For other objects it is ignored

Cancel

Event status. Default is False and indicates that the target object handles this event and not the main application

Ctrl

Target object

Action

Indicates the result, based on keyboard settings, of a pending drag-and-drop operation:

2 - fmActionPaste: Pastes the selected object on the target object

3 - fmActionDragDrop: Indicates that users dragged the selected object from its origin and dropped it on the target object

Data

Data being dragged to the target object

X, Y

Position of the mouse pointer inside the target object, in points. X is measured from object's left side and Y is measured from object's top

Effect

Indicates all actions the target object supports, that is, the effect of dragging over that object:

0 - fmDropEffectNone: The target object does not accept copying or moving from any origin

1 - fmDropEffectCopy: The target object allows copying from any origin to it

2 - fmDropEffectMove: The target object allows moving from any origin to it

3 - fmDropEffectCopyOrMove: The target object allows copying or moving from any origin to it

Shift

An integer whose sum of factors indicates the status of SHIFT, CTRL, and ALT keys:

1: SHIFT key pressed

2: CTRL key pressed

4: ALT key pressed

For example, a value equal to 5 indicates that SHIFT and ALT keys were pressed (1 + 4 = 5)

Was this page useful?