ruby-****@sourc*****
ruby-****@sourc*****
2012年 9月 20日 (木) 06:00:54 JST
------------------------- REMOTE_ADDR = 184.145.80.187 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-treev-parts ------------------------- @@ -288,7 +288,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 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 word value in this case is a bit of a misnomer -((*for any tree column view the value 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 shown 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 word value in this case is a bit of a misnomer -((*for any tree column view the value 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 shown in the following erroneous code segment: # The following is WRONG: column = Gtk::TreeViewColumn.new("Buy", renderer, "text" => BUY_IT, :foreground => "#ff0000") # ERROR !!!