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

Back to archive index

ruby-****@sourc***** ruby-****@sourc*****
2012年 8月 27日 (月) 09:55:48 JST


-------------------------
REMOTE_ADDR = 70.49.49.99
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-treev-trees
-------------------------
@@ -255,13 +255,17 @@
    end
  end
 
-{{image_right("liststore-cdFunc.png")}}
 
-Following is a simple example program demonstrating the use of ((*set_cell_data_func*)) function. Note that this function is associated with a particular cell renderer which is mapped to a tree view column via the column, associated with the renderer by Gtk::TreeViewColumn.new, and subsequently by the Gtk::TreeView#append_column(column) statement; so all ((*render, column,*))(which is associated with the((*set_cell_data_func*))function) and the((*tree view*))are all connected. The block associated with the cell data function is executed for every row for that particular view column, checking if "Buy" column contains TRUE. If it does, the background of the column is set to red. Note, how "Buy" column is attached the cell data function, which in turn is attached to the code block, that modifies the cell's background in accordance with the data value in the cell. This helper function and the associated code block are executed for every row in the tree store.
+
+
+Following are two example program demonstrating the use of ((*set_cell_data_func*)) function. Note that this function is associated with a particular cell renderer which is mapped to a tree view column via the column, associated with the renderer by Gtk::TreeViewColumn.new, and subsequently by the Gtk::TreeView#append_column(column) statement; so all ((*render, column,*))(which is associated with the((*set_cell_data_func*))function) and the((*tree view*))are all connected. The block associated with the cell data function is executed for every row for that particular view column.  
+
+{{image_right("liststore-cdFunc.png")}}
 
+In the first ("Grocery List") program, the block associated with((*set_cell_data_func*))function is checking if "Buy" column contains TRUE. If it does, the background of the column is set to red. Note, how "Buy" column is attached the cell data function, which in turn is attached to the code block, that modifies the cell's background in accordance with the data value in the cell. The second program ("Model/View Column Demo") an effort is made to control the entire row as well as a particular cell in the "Color Name" column. Both programs nicely demonstrate how the helper function and the associated code block are executed for each renderer, effecting each cell of for selected row(s) in every row for the tree store.
 
+((*liststore-cdFunc.rb*)) ("Grocery List")
 
-((*liststore-cdFunc*))
  #!/usr/bin/env ruby
  require 'gtk2'
 




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