require 'tkmove3.rb' include TestBed c = TkCanvas.new.pack testbed( c ) label = TkLabel.new.pack TkButton.new(nil, 'text'=>'bbox', 'command'=>proc{ c.delete('bbox') c.dtag('bbox') coord = c.bbox('item') # all items created by the TkDraw has the 'item' tag label.text( coord.inspect ) eval( "TkcRectangle.new(c, " + coord.join(',') + ").addtag('bbox')" ) }).pack Tk.mainloop