From: Joe Van Dyk <joevandyk / gmail.com> Subject: Re: tk canvas question Date: Wed, 22 Jun 2005 06:15:41 +0900 Message-ID: <c715e64050621141518afc887 / mail.gmail.com> > I found this code out there somewhere: (snip) > grp.add(TkcRectangle.new(canvas, '1c', '2c', '3c', '3c', > 'outline' => 'black', 'fill' => 'blue')) Please use TkcGroup#include. For example, ----------------------------------------------- require "tk" canvas = TkCanvas.new grp = TkcGroup.new(canvas) grp.include(TkcRectangle.new(canvas, '1c', '2c', '3c', '3c', 'outline' => 'black', 'fill' => 'blue'), TkcRectangle.new(canvas, '3c', '4c', '5c', '5c', 'outline' => 'black', 'fill' => 'blue')) canvas.pack grp.bind 'Enter' do grp.configure 'fill', 'red' end grp.bind 'Leave' do grp.configure 'fill', 'green' end Tk.mainloop ----------------------------------------------- TkcGroup has some bugs. I'll fix it later. And then, I'll revive TkcGroup#add. -- Hidetoshi NAGAI (nagai / ai.kyutech.ac.jp)