ruby-****@sourc*****
ruby-****@sourc*****
2012年 10月 7日 (日) 07:01:05 JST
------------------------- REMOTE_ADDR = 184.145.80.187 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-treev-spbttr ------------------------- @@ -20,14 +20,13 @@ #!/usr/bin/env ruby require 'gtk2' - - # Add three columns to the tree view. The first of the three + # Add three columns to the tree view. The first of the three # columns will be displayed as the toggle button, the second # column will be an editable spin button and the last column # will be the name of the product category or the product to buy. + def setup_tree_view(treeview) - - renderer = Gtk::CellRendererToggle.new + renderer = Gtk::CellRendererToggle.new column = Gtk::TreeViewColumn.new("Buy", renderer, "active" => BUY_COLUMN) renderer.activatable = true