Set the visual feedback for the drop operation

When using a table or tree-view as drop target, you can control the visual effect when the mouse flies over the rows, according to the type of drag & drop you want to achieve.

Basically, a dragged object can be:

  1. Inserted in between two rows (visual effect must show where the object will be inserted)
  2. Copied/merged to the current row (visual effect must show the row under the mouse)
  3. Dropped somewhere on the target widget (the exact location inside the widget does not matter)

The visual effect can be defined with the ui.DragDrop.setFeedback() method, typically called in the ON DRAG_ENTER block.

The values to pass to the setFeedback() method to get the desired visual effects described are respectively:

  1. insert (default)
  2. select
  3. all
DEFINE dnd ui.DragDrop 
...
DISPLAY ARRAY arr TO sr.* ...
  ...
  ON DRAG_ENTER (dnd)
    IF canDrop() THEN
      CALL dnd.setOperation(NULL)
    ELSE
      CALL dnd.setFeedback("select")
    END IF
    ...
END DISPLAY