The DragDrop class

The ui.DragDrop class is used to control the events related to drag & drop events. When implementing drag & drop in a dialog, the ON DRAG* / ON DROP dialog control blocks take a ui.DragDrop variable as a parameter to let you configure and control the drag & drop events. The ui.DragDrop variable must be declared in the scope of the dialog implementing drag & drop.

In the next example, the code defines a ui.DragDrop variable named dnd, and implements an ON DRAG_ENTER block taking dnd as the argument:
DEFINE dnd ui.DragDrop
...
DISPLAY ARRAY arr TO sr.* ...
  ...
  ON DRAG_ENTER(dnd)
    IF ok_to_drop THEN
      CALL dnd.setOperation("move")
    ELSE
      CALL dnd.setOperation(NULL)
    END IF
  ...
END DISPLAY