TTkDrag🌶️

class TTkDrag(**kwargs)[source]🌶️

Bases: TTkDnD

Methods🌶️

exec() None[source]🌶️

Starts the drag operation.

getDragEnterEvent(evt: TTkMouseEvent) TTkDnDEvent[source]🌶️

Returns a Drag and Drop event for the DragEnter event.

Parameters:

evt (TTkMouseEvent) – The mouse event

Returns:

The Drag and Drop event

Return type:

TTkDnDEvent

getDragLeaveEvent(evt: TTkMouseEvent) TTkDnDEvent[source]🌶️

Returns a Drag and Drop event for the DragLeave event.

Parameters:

evt (TTkMouseEvent) – The mouse event

Returns:

The Drag and Drop event

Return type:

TTkDnDEvent

getDragMoveEvent(evt: TTkMouseEvent) TTkDnDEvent[source]🌶️

Returns a Drag and Drop event for the DragMove event.

Parameters:

evt (TTkMouseEvent) – The mouse event

Returns:

The Drag and Drop event

Return type:

TTkDnDEvent

getDropEvent(evt: TTkMouseEvent) TTkDnDEvent[source]🌶️

Returns a Drag and Drop event for the Drop event.

Parameters:

evt (TTkMouseEvent) – The mouse event

Returns:

The Drag and Drop event

Return type:

TTkDnDEvent

hidePixmap() None[source]🌶️

Hides the pixmap used to represent the data in a drag and drop operation.

pixmap() TTkCanvas[source]🌶️

Returns the pixmap used to represent the data in a drag and drop operation.

Returns:

the pixmap used to represent the data in a drag and drop operation.

Return type:

TTkCanvas

setPixmap(pixmap: TTkWidget) None[source]🌶️

Sets the pixmap used to represent the data in a drag and drop operation. If a TTkWidget is provided as pixmap, its default rendering will be used in the pixmap TTkCanvas.

Parameters:

pixmap (TTkWidget or TTkCanvas) – the pixmap

showPixmap() None[source]🌶️

Shows the pixmap used to represent the data in a drag and drop operation.

visible() bool[source]🌶️

Returns pixmap’s visibility status.

Returns:

True if the pixmap is visible, False otherwise.

Return type:

bool