Applies to

TreeView controls


The DisableDragDrop property determines whether events for dragging, such as BeginDrag, are triggered when the user clicks on an item within the control and drags. DisableDragDrop affects only the dragging of items within the control.

When DisableDragDrop is true, no drag events occur when the user tries to drag an item. To implement drag and drop, write scripts for the appropriate dragging events.

DisableDragDrop also affects when selection occurs. When it is true, an item the user clicks is selected when the mouse button is pressed down. When it is false, the item is selected when the mouse button is released.


In a painter

To disable drag and drop within the TreeView control:

  • Select the DisableDragDrop check box on the General page of the control's Properties view.

In scripts

The DisableDragDrop property takes a boolean value. The following example prevents drag events from being triggered within a TreeView control:

tv_1.DisableDragDrop = TRUE