ruby-****@sourc*****
ruby-****@sourc*****
2012年 8月 17日 (金) 03:13:13 JST
------------------------- REMOTE_ADDR = 70.49.49.99 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-treev-parts ------------------------- @@ -226,12 +226,13 @@ treeview.append_column(column) -When defining a tree view column we need to provide the text for the header ("Buy" in our case here), the renderer to be used to render all the cells for this column in every row of this list store, and any number of attribute name/value pairs in a hash, where the name represents the attribute/property name and((*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: +When defining a tree view column we need to provide the text for the header ("Buy" in our case here), the renderer to be used to render all the cells for this column in every row of this list store, and any number of attribute name/value pairs in a hash, where the name represents the attribute/property name and((*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 !!! -In our example program (liststore.rb) above, we are defining three individual single columns, so we have a single name/value pair for each attribute. Finally we have to add (append) our newly defined column to the tree view. +In our example program (liststore.rb) above, we are defining three individual single columns, where we have a single name/value pair for each attribute. Finally we have to add (append) our newly defined column to the tree view. + ######## correction of what looks like an omission rather than a BUG # -s- ##########