Step 6: Update the Drop Target with the Drag Data

To update the drop target with the drag data, you must determine whether the drop target accepts the custom data name. If the drop target accepts the data name, retrieve the stored drag data and provide the data to the drop target.

What to Use

Use the following block diagram objects to update the drop target with the drag data:

Search 1D Array Not Equal? Case Structure Get Drag Drop Data Value












 Add  Find
 Add  Find
 Add  Find
 Add  Find
 Add  Find

What to Do

Create the following block diagram to update the drop target with the drag data.

The following list describes important details about the previous diagram:

Searching the Available Data Names determines whether the desired data name is available.
The Get Drag Drop Data function retrieves the drag data you provide to the Start Drag method when you provide the drag data. The data name you provide is the desired custom data name you create in the Mouse Leave event. The data type you provide is the data type of the drag source.

Tip Tip  To ensure that you use the correct data type, right-click the drag source on the block diagram and select Create»Constant. Wire the constant you create to the type parameter of the Get Drag Drop Data function.
If the data name is found, then the drag is acceptable and you can update the drop target. In the False case of the Case structure, do not update the drop target, and provide a FALSE value to the Accepted? input to indicate that the drop is not accepted.
The Value property refers to the value of the drop target. Use the Value property to update the drop target with the drag data.