diff options
author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-17 07:16:05 +0000 |
---|---|---|
committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-12-17 07:16:05 +0000 |
commit | 3270fda50052a7f9abf1ca340b0f75bb80a7170d (patch) | |
tree | c25abfa6b95c3832a2d01ebaf9945cfae11e2dd0 /ext/tk/sample | |
parent | e78cb14774c3c08f1475299bb684b933ba2591b0 (diff) | |
download | ruby-3270fda50052a7f9abf1ca340b0f75bb80a7170d.tar.gz |
* bug fix
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/sample')
-rw-r--r-- | ext/tk/sample/tkmultilistbox.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/tk/sample/tkmultilistbox.rb b/ext/tk/sample/tkmultilistbox.rb index 1896c66dac..ed5da0f21c 100644 --- a/ext/tk/sample/tkmultilistbox.rb +++ b/ext/tk/sample/tkmultilistbox.rb @@ -107,8 +107,6 @@ class TkMultiListbox < TkListbox @lbox_list.each{|lbox| lbox.yscrollcommand proc{|first, last| @v_scroll.set first, last - idx = lbox.nearest(0) - @lbox_list.each{|l| l.yview(idx)} } } @v_scroll.command proc{|*args| @lbox_list.each{|lbox| lbox.yview *args} } @@ -127,10 +125,12 @@ class TkMultiListbox < TkListbox proc{|w| focus_shift(w, 1); Tk.callback_break}, '%W') l.bind('Button-2', proc{|x, y| + @lbox_mark_x = x @lbox_list.each{|lbox| lbox.scan_mark(x, y)} }, '%x %y') l.bind('B2-Motion', proc{|x, y| - @lbox_list.each{|lbox| lbox.scan_dragto(x, y)} + @lbox_list.each{|lbox| lbox.scan_dragto(@lbox_mark_x, y)} + l.scan_dragto(x, y) }, '%x %y') l.bindtags(l.bindtags.unshift(@mode[@current_mode])) |