O'Reilly logo

Tcl/Tk in a Nutshell by Jeff Tranter, Paul Raines

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required