Control - DragOver Event

Fired during the drag and drop process when the cursor moves over the control

Member of Control (PRIM_CTRL)

Parameters

NameTypeData TypeDescription
PosX*InputIntegerVertical position of the cursor in pixels
PosY*InputIntegerHorizontal position of the cursor in pixels
Source*InputPRIM_CTRLReference to the component that started the drag process
Payload*InputPRIM_OBJTGeneric object that can be used to pass data as part or the drag and drop process
DragState*InputEnumerationDragOverEvent DragState
AcceptDrop*BothBooleanDragOverEvent AcceptDrop
DragCursor*BothPRIM_CRSRDragOverEvent DragCursor
ShowDropHilight*BothBooleanDragOverEvent ShowDropHilight
AggregatedSource*InputPRIM_CTRLReference to the component that started the drag process when the drag style is Aggregated
Origin*InputPRIM_CTRLReference to the control on which the event was initially fired
Handled*BothBooleanSet to true to stop the event being propagated to the parent control

Details

The DragOver event is fired when the mouse is dragged on to a control.
 
It is the second event in the drag and drop process - StartDrag, DragOver, DragDrop and EndDrag
 
DragOver fires repeatedly as the mouse moves in to and out of the control.
 
External drag and drop e.g. from Windows Explorer, is supported through the use of #sys_appln.AllowWindowsDragDrop property and the FilePaths object.
 
The DragState parameter contains information about the nature of the drag.

DragState Values

Enum ValueDescription
EnterThe cursor has entered the bounds of the control
ExitThe cursor has left the bounds of the control
HoverThe cursor is stationary with the bounds of the control
MoveThe cursor is moving over the control

Example

In this example, when the CustomerList fires a DragOver, the payload is checked to see whether it's a user defined Customer data object. If it's not, the drag event won't be allowed to continue.
Evtroutine Handling(#CustomerList.DragOver) AcceptDrop(#AcceptDrop) Payload(#Payload)
 
   #AcceptDrop := (#Payload *Is #DataCustomer)
 
Endroutine

See also

All Component Classes

Technical Reference

Febuary 18 V14SP2