Vcl.Controls.TControl.BeginDrag
Delphi
procedure BeginDrag(Immediate: Boolean; Threshold: Integer = -1);
C++
void __fastcall BeginDrag(bool Immediate, int Threshold = 0xffffffff);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | Vcl.Controls.pas Vcl.Controls.hpp |
Vcl.Controls | TControl |
Description
Starts the dragging of a control.
Call BeginDrag to start a drag operation. BeginDrag is called in application code only when the value of the control's DragMode is dmManual. If DragMode is dmAutomatic, BeginDrag is called automatically.
If the Immediate parameter is true, the mouse pointer changes to the value of the DragCursor property and dragging begins immediately. If Immediate is false, the mouse pointer does not change to the value of the DragCursor property and dragging does not begin until the user moves the mouse pointer the number of pixels specified by the Threshold parameter. If the caller passes a Threshold value less than 0 (such as the default value for this parameter), BeginDrag uses the DragThreshold property of the global Mouse variable.
Setting Immediate to false allows the control to accept mouse clicks without beginning a drag-and-drop or drag-and-dock operation.