[ruby-gnome2-doc-cvs] [Ruby-GNOME2 Project Website] update - tut-gtk2-treev-parts

Back to archive index

ruby-****@sourc***** ruby-****@sourc*****
2012年 8月 28日 (火) 10:01:13 JST


-------------------------
REMOTE_ADDR = 70.49.49.99
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-treev-parts
-------------------------
@@ -166,8 +166,14 @@
    column   = Gtk::TreeViewColumn.new("Count", renderer, :text => QUANTITY)
    treeview.append_column(column)
    renderer = Gtk::CellRendererText.new
-   column   = Gtk::TreeViewColumn.new("Product", renderer, :text => PRODUCT)
-   treeview.append_column(column)
+   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 
  end
  
  window = Gtk::Window.new("Grocery List")




ruby-gnome2-cvs メーリングリストの案内
Back to archive index