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

TCustomControlBar.DragControl

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

Declaration

Source position: extctrls.pp line 1628

protected function TCustomControlBar.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

TCustomControlBar.MouseMove

  

Handles a mouse move message including dragging a control band.

TCustomControlBar.OnBandDrag

  

Event handler signalled when a drag operation is about to begin for a band on the control bar.


Version 4.0 Generated 2025-05-03 Home