Sign in Join
FPDoc Onlineexperiment

TCustomTreeView.DragOver procedure

Member of TCustomTreeViewprotectedIn unit ComCtrls

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

Declaration

pascal
procedure 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

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