TTkDrag🌶️
- class TTkDrag(**kwargs)[source]🌶️
Bases:
TTkDnD
Methods🌶️
- data() Any 🌶️
Returns the data attached to this Drag object
- Returns:
The data attached to this Drag object
- Return type:
Any
- 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:
- 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:
- 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:
- 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:
- hidePixmap() None [source]🌶️
Hides the pixmap used to represent the data in a drag and drop operation.
- hotSpot() tuple[int, int] 🌶️
Returns the position of the hot spot relative to the top-left corner of the cursor.
- Returns:
the hotspot position
- Return type:
tuple[int,int]
- 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:
- setData(data: Any) None 🌶️
The data attached to this Drag object
- Parameters:
data (Any) – The data attached to this Drag object
- setHotSpot(pos: tuple[int, int]) None 🌶️
Sets the position of the hot spot relative to the top-left corner of the pixmap used to the point specified by hotspot.
- Parameters:
pos (tuple[int,int]) – the hotspot position
- 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 pixmapTTkCanvas
.