[ruby-gnome2-doc-cvs] [Hiki] create - tut-treeview-model-manipulate

Back to archive index

ruby-****@sourc***** ruby-****@sourc*****
2003年 11月 17日 (月) 05:57:16 JST


-------------------------
REMOTE_ADDR = 64.30.138.196
REMOTE_HOST = 
        URL = http://ruby-gnome2.sourceforge.jp/?tut-treeview-model-manipulate
-------------------------
= Manipulating Row Data

Adding empty rows to a data store is not terribly exciting, so let's see how we can add or change data in the store.  This is typically done with Gtk::TreeIter#[column]=.

Here is an example where we create a store that stores two strings and one integer for each row: 

 # Create a store for first name, last name, and year born
 liststore = Gtk::ListStore.new(String, String, Integer)

 # Append an empty row to the list store.
 iter = liststore.append

 # Fill fields with some data
 iter[0] = "Joe"
 iter[1] = "Average"
 iter[2] = 1970







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