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

Zurück zum Archiv-Index

ruby-****@sourc***** ruby-****@sourc*****
2012年 9月 21日 (金) 02:15:06 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 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!*))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 show
 n in the following erroneous code segment:
+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!*))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 s
 hown 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 メーリングリストの案内
Zurück zum Archiv-Index