Name

drag&drop

drag&drop operation [arg arg...]

Provide a drag-and-drop facility for Tk applications. Widgets registered as a drag-and-drop source can export data to other widgets registered as targets. The following operations are defined:

drag&drop active

Return 1 if a drag-and-drop operation is in progress, 0 otherwise. A drag-and-drop operation officially starts after the package command has been executed successfully, and ends after the send handler has been executed (successfully or otherwise).

drag&drop drag window x y

Handle dragging of the token window for source window during a drag-and-drop operation. If the token window is unmapped, the -packagecmd for the source window is executed. If this command is successful and returns a non-null string, the token window is mapped. On subsequent calls, the token window is moved to the given x y location.

drag&drop drop window x y

Handle the end of a drag-and-drop operation. If the location x y is over a compatible target window, the appropriate source handler for the first compatible data type is invoked. If the data transfer is successful, the token window is unmapped. Otherwise, a rejection symbol is drawn on the token window, and the window is unmapped after a small delay.

drag&drop errors [proc]

Specify that the Tcl procedure proc be used to handle errors that occur during drag-and-drop operations. If proc is not specified, the current error handler is returned. By default, all errors are sent to the usual tkerr or command and therefore ...

Get Tcl/Tk in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.