ruby-****@sourc*****
ruby-****@sourc*****
2012年 8月 16日 (木) 03:12:24 JST
------------------------- REMOTE_ADDR = 70.49.49.99 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-treev-parts ------------------------- @@ -201,7 +201,7 @@ Our example program introduces Gtk::CellRendererText class. This class provides a plethora of adittional properties and instance methods which you can use to alter the appearance of the display. So you will have an idea what instance methods, properties and signals are available to Gtk::CellRendererText objects, I will for your convenience list them at the end of this session. - column = Gtk::TreeViewColumn.new("Buy", renderer, "text" => $buy_it) + column = Gtk::TreeViewColumn.new("Buy", renderer, "text" => BUY_IT) treeview.append_column(column) When defining a tree view column we need to provide the text for the header, the renderer to be used on the elements (rows) of this column, and any number of attribute name/value pairs in a hash, where the name represents the attribute name and the value represents the column number. In our example we are defining three individual single columns, so we have a single name/value pair for each attribute. Finally we have to add (append) our newly defined column to the tree view.