Skip to main content

TdxCustomListView.DropTarget Property

Provides access to the target of the current drag-and-drop operation.

Declaration

property DropTarget: TdxListItem read; write;

Property Value

Type Description
TdxListItem

A target list item.

Remarks

The List View control highlights the specified item as a drag-and-drop operation target.

The DropTarget property returns a TdxListItem object only if the following conditions are met:

  • A drag-and-drop operation is underway.
  • The drag-and-drop operation is allowed (that is, the control’s OnDragOver event handler assigns True to the Accept parameter).

Otherwise, the DropTarget property returns nil (in Delphi) or nullptr (in C++Builder).

You can assign a list item to this property to highlight the item as a drop target, but only when the control performs no drag-and-drop operations. Subsequent drag-and-drop operations assign the actual drop target to the DropTarget property.

See Also