ruby-****@sourc*****
ruby-****@sourc*****
2012年 8月 12日 (日) 06:32:41 JST
------------------------- REMOTE_ADDR = 184.145.90.35 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-treeview-model-reference ------------------------- @@ -29,10 +29,9 @@ model = treeview.model iter = model.get_iter(path) # where path : The Gtk::TreePath or a String representation of a Gtk::TreePath. -Tree row references reveal the current path of a row with Gtk::TreeRowReference#path. There is no direct way to get a tree iter from a tree row reference, you have to retrieve the tree row reference's path first and then convert that into a tree iter. For example: +Tree row references reveal the current path of a row with Gtk::TreeRowReference#path. There is no direct way to get a tree iter from a tree row reference, you have to retrieve the tree row reference's path first and then convert that into a tree iter. For example following is a simulation showing how to obtain an iter from a tree reference: row_ref = Gtk::TreeRowReference.new(treestore, Gtk::TreePath.new("2:0:1")) - # o o o // . . . row_ref changes iter = row_ref.model.get_iter(row_ref.path) puts "Iter from Ref: First Name: #{iter[0]}"