require 'tkmove3.rb' include TestBed c = TkCanvas.new.pack testbed( c ) l = TkMessage.new TkFrame.new{|f| TkButton.new(f, 'text'=>'find_withtag', 'command'=>proc{ c.bind('B1-Motion', proc{}) c.dtag('selected'); c.bind('1', proc{ eval( "l.text( c.find_withtag('current').inspect )" ) }) }).pack('side'=>'left') TkButton.new(f, 'text'=>'find_withtag().shift', 'command'=>proc{ c.bind('B1-Motion', proc{}) c.dtag('selected'); c.bind('1', proc{ eval( "l.text( c.find_withtag('current').shift.inspect )" ) }) }).pack('side'=>'left') }.pack l.pack Tk.mainloop