ruby-****@sourc*****
ruby-****@sourc*****
2012年 9月 21日 (金) 03:56:13 JST
------------------------- REMOTE_ADDR = 184.145.80.187 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-treev-parts ------------------------- @@ -316,7 +316,7 @@ However, unlike the previous code example where we set the "text" and "foreground" attributes directly on the renderer, this code here is using Gtk::TreeIter's rather than direct access to renders's properties (attributes). More importantly the code using iters does two things - it sets both: (1) the columns in the model and also (2) the columns in the view. -As you see there are many issues to consider when dealing with tree model and tree view. It is not easy to learn all the aspects of this mechanism up front before you start to experiment with the programs. The best place to start investigating a program like our "liststore.rb" is the place where the tree view is initialized. In our example program this is the ((*setup_tree_view*)) method. In it, 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. Copy the program to your system and start playing with it. The above discussions should provide you with plenty of material to try different alternatives. +As you see there are many issues to consider when dealing with tree model and tree view. It is not easy to learn all the aspects of this mechanism up front before you start to experiment with the programs. The best place to get your feet wet in practice and begin investigating and learning the ropes tree view and tree model MVC pattern in GTK+ is a program like our "liststore.rb" at the place where the tree view is initialized. In our example program this is the ((*setup_tree_view*)) method. In it, 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. Copy the program to your system and start playing with it. The above discussions should provide you with plenty of material to try different alternatives.