Sign in Join
FPDoc Onlineexperiment

TCustomControlBar.DragControl function

Member of TCustomControlBarprotectedIn unit ExtCtrls

Signals an assigned OnBandDrag event handler and starts a drag operation for the specified control.

Declaration

pascal
function DragControl(AControl: TControl; X: Integer; Y: Integer; 
 KeepCapture: Boolean=False): Boolean; virtual

Arguments

AControl

TControl instance beneath the mouse pointer when an auto-drag operation is started for the control bar.

X

Horizontal position for the mouse pointer when the mouse move event occurred.

Y

Vertical position for the mouse pointer when the mouse move event occurred.

KeepCapture

This argument is not used in the current implementation.

Function result

True if the drag operation was started for the specified control.

Description

DragControl is a Boolean function used to start a drag operation using the control bar band for the control under the mouse pointer. DragControl is called from the MouseMove method, and occurs when a drag operation for a band on the control is auto-started.

AControl is the optional control on the band to be dragged in the method. If the band does not have a control, the argument value is Nil.

The X and Y arguments contain the coordinates for the mouse pointer when the mouse movement was detected and handled in MouseMove.

The return value is set to True on entry.

DragControl signals the OnBandDrag event handler (when assigned) to determine whether the control bar allows the specified control to the dragged. The handler routine can set the return value to False to prevent the drag operation from being started.

If the return value is True, the DragStart method in DragManager is called to start the drag operation for the specified control.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.