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

Back to archive index

ruby-****@sourc***** ruby-****@sourc*****
2012年 8月 17日 (金) 05:46:19 JST


-------------------------
REMOTE_ADDR = 70.49.49.99
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-treev-parts
-------------------------
@@ -281,7 +281,9 @@
 
 The((*text*))property above also needs special attention, since this attribute is most likely associated with the model, and hence is automatically rendered by Gtk, provided you set the appropriate column number for text via Gtk::TreeViewColumn.new.  You would set((*text*))manually only for virtual columns in tree view, or columns that need some intervention at run time. 
 
-From the above discussion about column numbers it is important to understand that model columns do not map directly to columns in tree view. While columns in model are determined by the order in which   Gtk::TreeView#append_column statements are executed, the mapping to view columns is defined by the programmer by defining the column numbers via Gtk::TreeViewColumn.new in((*:text = column_number*))idiom or in hash of attributes, when it is used instead. A renderer normally is associated only with a single view column, but can have associated more view columns, as is the case with our example exhibiting((*:foreground*))attribute. Each model column is automatically associated with a particular renderer in the order defined by the programmer at the time he or she issues Gtk::TreeView#append_column statements.
+From the above discussion about column numbers it is important to understand that model columns do not map directly to columns in tree view. While columns in view are determined by the order in which   Gtk::TreeView#append_column statements are executed, the mapping to model columns is defined by the programmer by defining the column numbers via Gtk::TreeViewColumn.new in((*:text = column_number*))idiom or in hash of attributes, when it is used instead. A renderer normally is associated only with a single view column, but can have associated more view columns, as is the case with our example exhibiting((*:foreground*))attribute. Each model column is automatically associated with a particular renderer in the order defined by the programmer at the time he or she issues Gtk::TreeView#append_column statements.
+
+However, earlier we have also learned, that cell renderers are packed into tree view columns similar to how you add widgets into horizontal boxes, and that each tree view column can contain one or more cell renderers, which are used to render the data. For example, in a file browser, the image column would be rendered with the Gtk::CellRendererPixbuf and the file name with Gtk::CellRendererText. Hence, we see time and time again, that we have to be careful not to assume one to one mapping of view and model columns.
 #-------
 #---------------------------
 ######## correction of what looks like an omission rather than a BUG # -e- ##########




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