Spread 8.0 Documentation
OLEDragDrop, ScriptOLEDragDrop Events
Support Options
ActiveX Reference > ActiveX Events > OLEDragDrop, ScriptOLEDragDrop Events

Glossary Item Box

OLEDragDrop, ScriptOLEDragDrop Events


See Also

Applies To

fpSpread and fpSpreadPreview controls

Description

Occurs when data is dropped onto the control.

Syntax

Visual Basic

Sub fpSpread_OLEDragDrop(Data As fpDataObject, Effect As Long, Button As Integer, Shift As Integer, x As Single, yAs Single)

Sub fpSpreadPreview_OLEDragDrop(Data As fpDataObject, Effect As Long, Button As Integer, Shift As Integer, x As Single, y As Single)

Note: The ScriptOLEDragDrop event uses the same syntax except event parameters that are not passed "ByVal" are declared as variants. For more information on Script events, see Scripting Environment Usage.

Parameter

The following parameters are available:

Parameter Description
Data An fpDataObject object containing formats and possibly data the object being dropped will provide.
Effect Identifies the action or actions that can be performed
Can be one of the following values:
Value Description
0 fpOLEDropEffectNone
1 fpOLEDropEffectCopy
2 fpOLEDropEffectMove
-2147483648 fpOLEDropEffectScroll
Button Indicates the state of the mouse button
Shift Indicates the state of the Shift, Ctrl, and Alt keys
x Location of the mouse pointer on the x-coordinate
y Location of the mouse pointer on the y-coordinate

Remarks

The OLEDropMode property must be set to 1 (fpOLEDropModeManual) for the OLEDragDrop event to occur.

The OLEDragDrop event occurs at the target control when the mouse button is released. After this event occurs, call the GetFormat method of the fpDataObject to query whether or not the desired format is available, then call the GetData method of the fpDataObject to retrieve the data.

The Effect parameters are passed to this event from the OLEStartDrag event (source control).

Note: This event will occur if you use the fpSpread or fpSpreadPreview control in a scripting environment (for example, Microsoft's Visual InterDev or Internet Explorer) or a non-scripting environment. However, if you want to use the fpSpread or fpSpreadPreview control in a scripting environment and you want to change any parameter that is not passed "ByVal", you must set the ScriptEnhanced property to True and use the ScriptOLEDragDrop event. ScriptOLEDragDrop event parameters that are not passed "ByVal" are declared as variants.

See Also

OLEDropMode, ScriptEnhanced properties

OLEDragOver, OLEStartDrag events

GetData, GetFormat methods

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.