Complete the following steps to set how the user can drag or drop items within listboxes, tree controls, strings, and paths at run time.
- In the front panel window, right-click the listbox, tree control, string, or path.
- Select from the following shortcut menu items:
- Drag and Drop»Allow Dragging (listboxes), Drag and Drop»Item Dragging»Allow Dragging (tree controls), Advanced»Allow Dragging (strings)—Allows users to drag items from the control at run time.
- Drag and Drop»Allow Dropping (listboxes), Drag and Drop»Item Dropping»Allow Dropping (tree controls), Advanced»Allow Dropping (strings and paths)—Allows users to drop items in the control at run time.
- Drag and Drop»Item Dragging»Allow Dragging of Parent Items (tree controls)—Allows the user to drag items that have other items indented under them and items that are not child-only and do not have other items indented under them.
- Drag and Drop»Item Dropping»Allow Dropping Between Items (tree controls)—Allows users to drag and drop an item between two other items in a tree control.
- Drag and Drop»Allow Drag Drop Outside Control (listboxes and tree controls)—Allows users to drag items from the control to other controls and drop items in the control from other controls.
- Drag and Drop»Drag Mode (listboxes and tree controls)—Determines whether a drag and drop operation copies or moves the item. You can select Copy or Move, Copy Only, or Move Only. If you select Copy or Move, pressing the <Ctrl> key copies the item.
Use the drag and drop Control events for more control over how users drag and drop items within controls.
You also can use the drag and drop ListBox, MulticolumnListbox, TreeControl, String, or Path properties to set item dragging and dropping programmatically. You can start a drag on any control programmatically using the Start Drag method.