Control - StartDrag Event

Fired when the user starts a drag and drop process

Member of Control (PRIM_CTRL)


Name Type Data Type Description
Source *Input PRIM_CTRL Reference to the component that started the drag process
Payload *Both PRIM_OBJT Generic object that can be used to pass data as part or the drag and drop process
Continue *Both Boolean Set to false to stop the drag and drop process
DragList *Both PRIM_DGLT Provides an instance of a Draglist component used to alter the cursor and image when dragging
AggregatedSource *Input PRIM_CTRL Reference to the component that started the drag process when the drag style is Aggregated
Origin *Input PRIM_CTRL Reference to the control on which the event was initially fired
Handled *Both Boolean Set to true to stop the event being propagated to the parent control


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.


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

See also

All Component Classes

Technical Reference

LANSA Version 15, April 2020