From: Phlip Date: 2001-10-28T01:38:17+09:00 Subject: [ruby-talk:23639] Re: How to draw using Ruby/GTK? dAHen wrote: > > I have created small applications width Ruby/GTK. > But I have only used the widgets. > > Now I want to be able to draw (like on a Java Canvas). > I can't find a class similar to Canvas. > I want to be able to create components and tell them to paint themselves. > In Java I just pass them a Graphics-object. How do I do it in Ruby/GTK? I typed this into bash on my 'puter... grep -i canvas `locate .rb | grep gtk` ....and discovered gtk/sample/drawing.rb contains this line: class Canvas < Gtk::DrawingArea That looks very close to what you need. I hope this little experience has taught you a lesson about reading the documentation vs grepping the source. -- Phlip http://www.greencheese.org/ParodyMode