trigger copyTo

Interactive trigger that handles processing when one or more items are copied to a tree or picture widget by the Copy drop action.

trigger copyTo
   string dragvalue : in
   string dropformat : in
   string itemvalue : in
   numeric numberofobjects : in
   numeric index : in
; <Your code here>
end ; trigger copyTo
Applies to: Form widgets: upicture (Picture), utree (Tree)
Activation: Activated on the target widget when a Copy drop action occurs, once for each selected object.
Default behavior: None
Behavior upon completion: None


  • dragvalue— value of the dragged object
  • dropformat—negotiated drop format
  • itemvalue—value of the (tree) item on which the drop occurs. If the drop occurs on a picture widget, the value will be "" (empty string).

For multiple drops:

  • numberofobjects—number of multiple objects being dropped
  • index—numeric index, starting with 1, of the object being dropped


Tree and Picture widgets support drag and drop behavior using drag-and-drop formats, which are global objects that define the actions, pop-up menu, and cursor icons available when dragging or dropping objects in these widgets. For more information, see Drag and Drop Behavior for Tree and Picture Widgets.

If the ProcScript in the trigger returns -1, the associated object is not dropped. If it returns -2, the drop action is aborted for all objects.

Related Topics