require 'tkmove3.rb' include TestBed c = TkCanvas.new.pack testbed( c ) x1, y1, x2, y2 = 50, 50, 200, 150 TkcRectangle.new(c, x1, y1, x2, y2) TkFrame.new{|f| TkButton.new(f, 'text'=>'addtag_enclosed', 'command'=>proc{ c.dtag('selected'); c.addtag_enclosed('group', x1, y1, x2, y2) }).pack('side'=>'left') TkButton.new(f, 'text'=>'dtag', 'command'=>proc{ c.dtag('group') }).pack('side'=>'left') }.pack Tk.mainloop