require 'tkmove3.rb' include TestBed c = TkCanvas.new.pack testbed( c ) f = TkFrame.new.pack TkButton.new(f, 'text'=>'addtag_above', 'command'=>proc{ c.bind('B1-Motion', proc{}) c.bind('1', proc{ item = c.find_withtag('current').shift c.addtag_above( 'above', item ) item = c.find_withtag('above').shift if item != nil item.fill('yellow') end c.dtag('above') }) }).pack('side'=>'left') Tk.mainloop