From: Witold Rugowski Date: 2008-01-09T06:38:33+09:00 Subject: Ruby/Tk - binding to canvas items Hi! I have canvas items (TkcLine to be exact) and I need to bind some code executed on click. I use code similar to this: line = TkcLine.new($root, arg, :fill => '#000', :width => 2) line.bind("Button-1") {|e| #some actions } It works, but I dont know how to get which item was clicked. I have bunch of lines in one canvas. Event passed to code does refers only to widget which was clicked, but this is canvas itself, not particular canvas item. Is possible to know which line was clicked? Best regards, -- Witold Rugowski http://nhw.pl/wp/ (EN blog) http://FriendsFeedMe.com -- Posted via http://www.ruby-forum.com/.