ruby-****@sourc*****
ruby-****@sourc*****
2012年 9月 20日 (木) 09:44:41 JST
------------------------- REMOTE_ADDR = 184.145.80.187 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-treev-parts ------------------------- @@ -175,13 +175,8 @@ treeview.append_column(column) renderer = Gtk::CellRendererText.new renderer = Gtk::CellRendererText.new - =begin # (alternative column creation and appending it -1/2-) - column = Gtk::TreeViewColumn.new("Product", renderer, :text => PRODUCT) - treeview.append_column(column) - =end - # (alternative column creation and appending it -2/2-) - col_offset = treeview.insert_column(-1, 'Product', renderer, 'text' => PRODUCT) - column = treeview.get_column(col_offset - 1) # retrieve a column should you need it + column = Gtk::TreeViewColumn.new("Product", renderer, :text => PRODUCT) + treeview.append_column(column) end window = Gtk::Window.new("Grocery List")