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

Back to archive index

ruby-****@sourc***** ruby-****@sourc*****
2012年 9月 21日 (金) 03:17:26 JST


-------------------------
REMOTE_ADDR = 184.145.80.187
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-treev-parts
-------------------------
@@ -293,7 +293,7 @@
 
 
 
-When defining a tree view column we need to provide (1) the text for the header ("Buy" in our case here), (2) the renderer to be used to render all the cells for this column in every row of this list store, and (3) the value  (BUY_IT) either as a parameter (if Gtk::TreeViewColumn#add_attribute is used), or in the event that a statement uses a hash, such as in Gtk::TreeViewColumn.new and in Gtk::TreeViewColumn#set_attributes, any number of attribute name/value pairs in the hash, where the name represents the attribute/property name (:text) and the value (BUY_IT) a column number in the model. The use of word "value" in all these cases is rather mis-fortunate and a bit of a misnomer -((*for any tree column view the value in the name/value pair here represents the column number, not the attribute's value!*))It is very important to realize that you can not set property values here. For instance one can not set((*:foreground*))attribute's value to a desired colour within Gtk::Tree
 ViewColumn.new code as is shown in the following erroneous code segment:
+When defining a tree view column we need to provide (1) the text title for the header ("Buy" in our case here), (2) the renderer to be used to render all the cells for this column in every row of this list store, and (3) the value  (BUY_IT) either as a parameter (if Gtk::TreeViewColumn#add_attribute is used), or in the event that a statement uses a hash, such as in Gtk::TreeViewColumn.new and in Gtk::TreeViewColumn#set_attributes, any number of attribute name/value pairs in the hash, where the name represents the attribute/property name (:text) and the value (BUY_IT) a column number in the model. The use of word "value" in all these cases is rather mis-fortunate and a bit of a misnomer -((*for any tree column view the value in the name/value pair here represents the column number, not the attribute's value!*))It is very important to realize that you can not set property values here. For instance one can not set((*:foreground*))attribute's value to a desired colour within Gtk
 ::TreeViewColumn.new code as is shown in the following erroneous code segment:
 
  # The following is WRONG:
  column = Gtk::TreeViewColumn.new("Buy", renderer, "text" => BUY_IT, :foreground => "#ff0000")  # ERROR !!!




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