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

Back to archive index

ruby-****@sourc***** ruby-****@sourc*****
2012年 10月 8日 (月) 03:09:04 JST


-------------------------
REMOTE_ADDR = 184.145.80.187
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-treev-crs
-------------------------
@@ -36,7 +36,7 @@
 
 {{image_right("treev-crs-01.png")}}
 
-As you can see from the image on the right we are continuing to use the same program example as in the introductory session to the tree store (1.3 ((<Using Gtk::ListStore|tut-gtk2-treev-parts#Using Gtk::ListStore>))). The example program there we called 'liststore.rb', which then in the following section ((<(Using Gtk::TreeStore)|tut-gtk2-treev-trees>)) got the present "tree-view shape" and was more appropriately called 'treestore.rb'. The only changes in the program here are in the ((*setup_tree_view(treeview)*)) method, where we had to change the type of our cell renderer. An important, often overlooked change is also in the column line, where we change the name of the attribute that used to be "text" to "active". Since we wish to provide our users with the ability to interactively change the status of "Buy" column, we need to make our toggle button clickable, which means that we also need to provide the callback proc (block), triggered by the((*toggled*))signal, which wil
 l set the toggle to the new value.
+As you can see from the image on the right we are continuing to use the same program example as in the introductory session to the tree store (1.3 ((<Using Gtk::ListStore|tut-gtk2-treev-parts#Using Gtk::ListStore>))). The example program there we called 'liststore.rb', which then in the following section ((<(Using Gtk::TreeStore)|tut-gtk2-treev-trees>)) got the present "tree-view shape" and was more appropriately called 'treestore.rb'. The only changes in the program here are in the ((*setup_tree_view(treeview)*)) method, where we had to change the type of our cell renderer. An important, and easily overlooked change is also in the column line, where we change the name of the attribute that used to be "text" to "active". Since we wish to provide our users with the ability to interactively change the status of "Buy" column, we need to make our toggle button clickable, which means that we also need to provide the callback proc (block), triggered by the((*toggled*))signal, whic
 h will set the toggle to the new value.
 
 The listing 'toggle-rndr-1.rb' presents the Grocery List application with the just mentioned callback code block. In it the we alter the value in the model for the current row in the GItm::BUY_INDEX column, which subsequently effects the respective cell in the tree view as the toggle renderer renders it on the display.
 




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