ComponentOne True DBInput Pro 8.0
OLEStartDrag Event (TDBDate)

 

Reference> TDBDate Control> TDBDate Control Events> OLEStartDrag Event (TDBDate)

OLEStartDrag Event (TDBDate)

Occurs when a component's OLEDrag method is performed, or when a component initiates an OLE drag/drop operation when the OLEDragMode property is set to Automatic. The target component can use this value to determine the appropriate action (and what the appropriate user feedback should be).

Syntax

control_OLEStartDrag (Data As DataObject, AllowedEffects As Long)

Arguments

data is a DataObject object containing formats that the source will provide and, in addition, possibly the data for those formats. If no data is contained in the DataObject, it is provided when the control calls the GetData method. The SetData and Clear methods cannot be used here.

allowedeffects is a long integer containing the effects that the source component supports.

Valid settings for the allowedeffects parameter are as follows:

0

None. Drop target cannot accept the data.

1

Copy. Drop results in a copy of data from the source to the target. The original data is unaltered by the drag operation.

2

Move. Drop results in data being moved from drag source to drop source. The drag source should remove the data from itself after the move.

Remarks

The OLEStartDrag event also occurs if the component's OLEDragMode property is set to Automatic. This allows you to add formats and data to the DataObject object after the component has done so. You can also override the default behavior of the component by clearing the DataObject object (using the Clear method) and then adding your data and formats.

You may wish to defer putting data into the DataObject object until the target component requests it. This allows the source component to save time by not loading multiple data formats. When the target performs the GetData method on the DataObject, the source's OLESetData event will occur if the requested data is not contained in the DataObject. At this point, the data can be loaded into the DataObject, which will in turn provide the data to the target.

If the user does not load any formats into the DataObject, then the drag/drop operation is canceled.

See Also

OLESetData Event (TDBDate)

OLEDrag Method (TDBDate)

OLEDragMode Property (TDBDate)

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback