RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TControl.BeginDrag Method

Starts the dragging of a control.

Pascal
procedure BeginDrag(Immediate: Boolean; Threshold: Integer = -1);
C++
__fastcall BeginDrag(Boolean Immediate, int Threshold = -1);

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 doesn't change to the value of the DragCursor property and dragging doesn't 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. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!