【发布时间】:2011-10-23 15:05:41
【问题描述】:
我希望我的画布在画布区域上的任意位置单击鼠标按钮时执行一个动作。我已经能够绑定点击,但仅限于在现有对象上进行:
$this/zinc bind all <Button-1> [list select_shape $this]
我尝试使用相同的命令而不指定标签:
$this/zinc bind <Button-1> [list select_shape $this]
它给出了一个错误。
并且通过给出一个空字符串而不是一个标签:
$this/zinc bind "" <Button-1> [list select_shape $this]
就好像我写了all。
我应该提供什么 tag 以便它可以在画布中的任何位置工作,或者如何避免指定 tag?
【问题讨论】: