Entering content frame

Function documentationDrag and Drop Events Locate the document in its SAP Library structure

This section only describes those properties of drag and drop events that apply to all controls. The individual control wrappers may augment them. You should therefore consult the relevant control documentation to see if that control has any peculiarities.

Use

There are four standard events in a drag and drop operation at which control is returned to the application program. You use the event handler methods for these events to implement the actions that should be performed during the operation.

Note

Some control wrappers offer additional drag and drop events. For further information, refer to the documentation of the individual controls.

Prerequisites

To be able to react to an event, you must first register it. Unlike normal event handling, you do not register drag and drop events with the Control Framework using the set_registered_events method Instead, they are registered automatically by the wrapper of the control that you are using.

However, you still have to specify handler methods for the events.

DATA tree TYPE REF TO cl_gui_simple_tree.
SET HANDLER dragdrop=>on_drag FOR tree.

The events are always registered as system events.

Features

In a drag and drop operation, the Control Framework does not pass any events to the application server until the object is dropped. At the application server, it is separated into up to four standard events that can occur within a drag and drop operation, as described in Process Flow of a Drag and Drop Operation. All events have a drag and drop data object as an event parameter. You use this parameter to manage the context of the drag and drop operation. The particular control wrapper that you are using also provides further information about the drag and drop context. For further information, refer to the documentation of the relevant control wrapper.

The event is triggered by the target object of the drag and drop operation.

Leaving content frame