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

TDragOverEvent

The type of an OnDragOver handler.

Declaration

Source position: controls.pp line 507

type TDragOverEvent = procedure(

  Sender: TObject;

  Source: TObject;

  X: Integer;

  Y: Integer;

  State: TDragState;

  var Accept: Boolean

) of object;

Arguments

Sender

  

The possible drop target (control).

Source

  

The object (TDragObject or TControl) being dragged.

X

  

X coordinate of the mouse on screen.

Y

  

Y coordinate of the mouse on screen.

State

  

The current DragState (entering, leaving or moving over the target).

Accept

  

Set Accept to False to reject an drop (default is True).

Description

An OnDragOver event is sent by a control, when an object is dragged over it. The handler can specify whether a drop will be accepted or rejected.

Remark: Source is polymorphic, can be either the DragObject or the dragged control! This depends on DragObject.AutoCreated, for no sane reason.

See also

TDockOverEvent

  

The type of an OnDockOver handler.


Version 3.2 Generated 2024-02-25 Home