When the user tries to drag and drop data between controls, he or she causes particular events to occur. To allow the user to successfully copy or move data from the drag source to the drop target, you must configure the relevant events to interpret user actions as drag-and-drop behavior.

What to Use

Use the following block diagram objects to prepare the VI to detect when the user causes drag-and-drop events to occur:

What to Do

Create the following block diagram to prepare the VI to detect when the user causes drag-and-drop events to occur.

The following list describes important details about the previous block diagram:

Note The controls in the events above are labeled Drag Source and Drop Target. To implement drag-and-drop behavior, set the desired drag source to be the event source for the Mouse Down and Mouse Leave events, and set the desired drop target to be the event source for the Drag Enter and Drop events.

After you prepare the VI to detect when the user causes drag-and-drop events to occur, detect when the user aborts a drag-and-drop operation.