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

TCustomTreeView.DragOver

Performs actions needed when an object is dragged over the tree view control.

Declaration

Source position: comctrls.pp line 3590

protected procedure TCustomTreeView.DragOver(

  Source: TObject;

  X: Integer;

  Y: Integer;

  State: TDragState;

  var Accept: Boolean

); override;

Description

DragOver is an overridden method in TCustomTreeView used to perform actions needed when an object is dragged over the tree view control. DragOver calls the inherited method on entry to get the initial value for the Accept argument and signal the OnDragOver event handler (when assigned). The event handler is used to determine whether a drop can be accepted for the specified object instance. If the event handler has not been assigned, Accept is set False.

DragOver checks for a tree node at the coordinates in X and Y, and checks whether the node is DropTarget for the control. If the node is different than the DropTarget for the control, the DropTarget property in the TTreeNode instance is set to True.

See also

TCustomTreeView.DropTarget

  

DropTarget - the target node for dropping a dragged item.

TTreeNode.DropTarget

  

True if the node is a drop target in a drag and drop operation.

TControl.DragOver

  

Called when an object is dragged over this control; Determines whether a drop is acceptable, using the OnDragOver handler.

TControl.OnDragOver

  

Event handler signalled when a control is dragged over the control instance.


Version 3.2 Generated 2024-02-25 Home