summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorwordtech <wordtech@f3661a36-4baa-549a-d6c7-40e0ffef350e>2009-12-18 05:40:40 (GMT)
committerwordtech <wordtech@f3661a36-4baa-549a-d6c7-40e0ffef350e>2009-12-18 05:40:40 (GMT)
commit0aa872a21f85f69cfaf99e0c49eabeda93e7aeb8 (patch)
tree54650c66d7714496833337fc7e7605ea408a3e6b /demos
parentf669350e205ff163fa34462a567ef39ffd8fe5ad (diff)
downloadtkdnd-0aa872a21f85f69cfaf99e0c49eabeda93e7aeb8.zip
tkdnd-0aa872a21f85f69cfaf99e0c49eabeda93e7aeb8.tar.gz
tkdnd-0aa872a21f85f69cfaf99e0c49eabeda93e7aeb8.tar.bz2
Improvements to Mac OSX library to alllow binding to target widget not toplevel
Diffstat (limited to 'demos')
-rw-r--r--demos/macdemo.tcl8
1 files changed, 3 insertions, 5 deletions
diff --git a/demos/macdemo.tcl b/demos/macdemo.tcl
index 41ab1ce..d3b4d65 100644
--- a/demos/macdemo.tcl
+++ b/demos/macdemo.tcl
@@ -6,13 +6,11 @@ pack [text .t -bg white] -fill both -expand yes
tkdnd::drop_target register .t *
-#Note that when you register a widget, you must apply bindings to its toplevel parent. The C impelmentation of tkdnd on the Mac does not work on child widgets, only the toplevel window.
-
-bind . <<Drop>> {.t insert end %D }
+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 . <<DropEnter>> {.t configure -bg red}
-bind . <<DropLeave>> {.t configure -bg white}
+bind .t <<DropEnter>> { %W configure -bg red}
+bind .t <<DropLeave>> {list copy; %W configure -bg white}