Event XbpCrt():dragMotion Foundation
Item is being dragged inside a drop zone.
:dragMotion := {| aState, uNIL, self | ... } --> nAction
:dragMotion( aState, NIL ) --> nAction
xbeP_DragMotion (1048651)
Both the code block and the method must return a numeric value represented by one of the XBP_DROPMODE_xxx constants defined in XBP.CH. The return value indicates whether the application supports dropping the item or items being dragged. If both a method and a code block have been defined, the value returned by the code block takes precedence.
The xbeP_DragMotion event is generated if an item is dragged around over a drop zone. If xbeP_DragMotion is received by an Xbase++ application, it must indicate whether it is prepared to accept the item or items being dragged. This is done by returning one of the following constants defined in XBP.CH.
Constant | Description |
---|---|
XBP_DROPMODE_NONE | Application cannot handle the item(s) being dragged |
XBP_DROPMODE_COPY *) | Drop results in a copy of the item(s) being dragged |
XBP_DROPMODE_MOVE | Data provider should remove its copy of the item(s) after the drop |
XBP_DROPMODE_LINK | Data provider should create a link to the original item(s) |
|
If the application returns a value other than XBP_DROPMODE_NONE, the system displays a type of mouse pointer that indicates to the user that the item can be dropped at the current location. If XBP_DROPMODE_NONE is returned, the mouse pointer is changed to indicate that dropping the item would have no effect.
The xbeP_DragMotion event is sent synchronously via the :handleEvent() method of an XbpCrt object. This means that xbeP_DragMotion is not by the AppEvent() function. As it is generated while the user manipulates an item, we strongly discourage to perform lengthy operations while processing the event.
An example that illustrates how to accept items being dragged can be found under :dropZone.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.