TControl.DoDragMsg function
Handler for a drag message, sent by the DragManager to the current target control.
Declaration
function DoDragMsg(ADragMessage: TDragMessage; APosition: TPoint;
ADragObject: TDragObject; ATarget: TControl;
ADocking: Boolean): LRESULT; virtualArguments
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
Contains the result for the Drag message.
Description
These messages can be sent while dragging:
- dmFindTarget
- Request to determine the possible target control for an drop. A TControl returns itself, a TWinControl finds the child control closest to the mouse position.
- dmDragEnter, dmDragLeave, dmDragMove
- Notification of mouse moves. Invokes DragOver, or DockOver if docking. Result indicates acceptance of a drop.
- dmDragDrop
- The dragged object has been dropped onto this control. Invokes DragDrop, or DockDrop if docking.
The Source argument of the invoked methods is the DragDockObject
when docking. If the DragObject has been AutoCreated, the dragged control is
passed as the Source. Otherwise, the DragObject itself is passed as Source.
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
