[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Controls' (#lcl)

TControl.DoDragMsg

Handler for a drag message, sent by the DragManager to the current target control.

Declaration

Source position: controls.pp line 1340

protected function TControl.DoDragMsg(

  ADragMessage: TDragMessage;

  APosition: TPoint;

  ADragObject: TDragObject;

  ATarget: TControl;

  ADocking: Boolean

):LRESULT; virtual;

Arguments

ADragMessage

  

The task to perform.

APosition

  

The mouse position in screen coordinates.

ADragObject

  

The drag object.

ATarget

  

The drop target, Nil if none.

ADocking

  

Distinguishes between a drag-drop and drag-dock operation.

Function result

Result is polymorphic: On dmFindTarget the result is the target control reference, on dmDragDrop it's zero, else it indicates acceptance of an drop.

Description

These messages can be sent while dragging:

The Source argument of the invoked methods is the DragDockObject when docking. Else if the DragObject has been AutoCreated, the dragged control is passed as the Source; otherwise the DragObject itself is passed as Source.

The latest version of this document can be found at lazarus-ccr.sourceforge.net.