Skip to main content

DropEvent (8.5)

Describes a drop that occurred on a target. Passed to the handlers of a Drop.

class DropEvent

Properties​

position​

position: Point

The position of the pointer in the component's coordinate system when the drop occurred.


frame​

frame: Rect

The component's bounding box during the event.

Methods​

has_format​

has_format(_ mime_type: String) -> (Bool)

Returns whether data for the given MIME type was attached to this event.


data​

data(format: String) -> (String)

Retrieves the data for the given MIME type.

If data for the requested MIME type is not available, an internal exception is thrown.

See this article for more information on MIME types.


supports_action​

supports_action(_ action: DropAction) -> (Bool)

Returns whether the drag operation supports the given action.

See DropAction.