About drag-and-drop in forms

For situations where drag-and-drop capability is desired, you can set up two or more components to perform these operations. For example, you might want to allow users to delete records by dragging a row from a grid collection to a trash can icon.

WinStudio uses a combination of [Drag From Events] and [Drop On Events] to perform drag-and-drop operations. During run time, this is how the system works:

  • A user clicks and holds down the mouse button, with the cursor hovering over a component that has at least one [Drag From Event] configured.
  • WinStudio recognizes that there is at least one [Drag From Event] configured and draws a "drag image" to visually cue the user that the object has been "captured."

This drag image, by default, is a semitransparent rendering of the component from which the object was selected. You can use the [Drag Image] property to replace the default with a graphic image.

  • The user drags the object to a component that has a matching [Drop On Event] configured and releases the mouse button.
  • WinStudio recognizes that there is a corresponding [Drop On Event] configured. WinStudio then generates the first event that matches a [Drag From Event] with a [Drop On Event].
注: 
  • If the object being dragged is a record from a grid collection, the default "sprite" is the visible portion of the column in which the record was captured. If this is not the desired effect, you can use the [Drag Image] property to assign a graphic file to use as the "sprite" image.
  • You can drag and drop any component except the Form Page, the Toolbar Button, or the Menu Item.
  • To enable drag-and-drop from graph components, you must lock the graph object.
  • If you enable drag-and-drop for an Edit component, users are unable to select text in that field.
関連トピック