Control - StartDrag Event

Fired when the user starts a drag and drop process

Member of Control (PRIM_CTRL)

Parameters

NameTypeData TypeDescription
Source*InputPRIM_CTRLReference to the component that started the drag process
Payload*BothPRIM_OBJTGeneric object that can be used to pass data as part or the drag and drop process
Continue*BothBooleanSet to false to stop the drag and drop process
DragList*BothPRIM_DGLTProvides an instance of a Draglist component used to alter the cursor and image when dragging
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 StartDrag event is fired when the a drag and drop process commences
 
It is the first event in the drag and drop process - StartDrag, DragOver, DragDrop and EndDrag
 
StartDrag is used to populate the generic payload object with whatever information is being transferred and to configure the drag cursor via the DragList parameter
 
StartDrag will only fire if the the control being dragged has a DragStyle property of Automatic or Aggregated.
 
The Payload parameter provides a generic space where you can store information about the nature of the data being dragged.  The Payload instance will be available on every one of the four drag and drop events.

Example

In this example, the customerlist is being dragged from. A Customer data object is stored as the RelatedReference of list item, and this is used as the payload.
Evtroutine Handling(#CustomerList.StartDrag) Payload(#Payload)
 
   #Payload <= #CustomerList.FocusItem.RelatedReference
 
Endroutine

See also

All Component Classes

Technical Reference

Febuary 18 V14SP2