IDimensionViewer.DropTargetNode

Syntax

DropTargetNode: Integer;

Description

The DropTargetNode property determines the component node, over which a user is currently dragging another node.

Comments

Used for Drag&Drop mechanism configuring. Assigning a value to the property results in node selection.

Matters only for the DimensionTree component.

Example

Executing the example requires a form with the Button1 button, the DimensionTree component named DimensionTree1 and the UiDimension component, that is a data source for the DimensionTree1. The Drag&Drop mechanism is enabled for the DimensionTree1.

Sub DimensionTree1OnDragOver(Sender: Object; Args: IDragEventArgs);

Var

Node: Integer;

Begin

Node := DimensionTree1.GetItemAt(Args.Point);

If Node <> -1 Then

DimensionTree1.DropTargetNode := Node;

End If;

Args.Effect := DragDropEffects.Move;

End Sub DimensionTree1OnDragOver;

After executing the example, when dragging any node in the DimensionTree1 component, the node being dragged becomes selected.

See also:

IDimensionViewer