Drag-and-Drop Formats

Drag-and-drop formats are global objects that define drag and drop behavior, including the default action, pop-up menu, and icon that are available when performing drag and drop actions in the tree and picture widgets. They are not used for drag-and-drop widgets.

Triggers for drag and drop actions, such as movefrom, moveto, and movewithin, use the formats as parameters.

At runtime, Uniface selects the first format that is defined for both the drag source and the drop target. The formats are enumerated in the sequence in which they are defined in the Accepted Drop Formats property of the widget..

For example, if the accepted drop formats are hammer, tool, and metal object and the dragged object supports the formats saw, tool, and metal object, then tool is selected as the matching format.

This is visible as soon as you drag the object over the drop target if different glyphs are defined for the different formats.

Predefined Formats

Uniface recognizes two standard drag and drop formats:

  • TEXT—used for drag and drop of selected text with other applications, such as WordPad.

  • U_MULTIPLESELECT—used only for dragging multiple objects in the list view part of a tree widget. For more information, see utree (Tree).

By default, no glyphs or pop-up menus have been defined for these formats.

Related Topics