Tk Library Source Code


[ Main Table Of Contents | Table Of Contents | Keyword Index | Categories | Modules | Applications ]


canvas::drag - Manage the dragging of canvas items or item groups

Table Of Contents


package require Tcl 8.5
package require Tk 8.5
package require canvas::drag ?0.1?

::canvas::drag on canvas tagOrId cmd option...
::canvas::drag off canvas tagOrId
::canvas::drag item canvas tagOrId option...
::canvas::drag group canvas tagOrId cmd option...
{*}cmd start canvas item
{*}cmd move canvas clientdata dx dy
{*}cmd done canvas clientdata


This package provides utility commands to setup and rmeove dragging of items or item groups on a canvas, hiding all complexity regarding bindings from the user.


Drag callback

The drag callback is a command prefix invoked in the following two ways:


The commands to create drag operations (on, item, and group) all accept the following options to configure the new drag.

Bugs, Ideas, Feedback

This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category canvas of the Tklib Trackers. Please also report any ideas for enhancements you may have for either package and/or documentation.


canvas, dragging