ruby-****@sourc*****
ruby-****@sourc*****
2012年 9月 9日 (日) 02:00:23 JST
------------------------- REMOTE_ADDR = 184.145.80.187 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-txtw-ttags ------------------------- @@ -346,3 +346,12 @@ window.add(hbox) window.show_all Gtk.main + + + +From the programming point of view the new version of this program is really not a great improvement. However, for someone who just started learning Ruby and GTK+ the modification of a built in class Gtk::Button makes it a valuable learning exercise. In the above code pay attention to the following: + + # Our little addition to the Button class, in order to + # save what usually is stored as label, however we use + # stock item rather than a label. + class Gtk::Button; attr_accessor :texttag; end