summaryrefslogtreecommitdiffstats
path: root/demos/macdemo.tcl
blob: d3b4d65dd83e8f652f0a213afed6220e994140a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
##this package demonstrates TkDND on the Mac. 

package require tkdnd

pack [text .t -bg white] -fill both -expand yes

tkdnd::drop_target register .t *

bind .t <<Drop>> {%W insert end %D}

##Note these two bindings are no-op on the Mac; the C-level impelmentation takes care of the changing cursor. 
bind .t <<DropEnter>> { %W configure -bg red}
bind .t <<DropLeave>> {list copy; %W configure -bg white}