ruby-****@sourc*****
ruby-****@sourc*****
2012年 9月 28日 (金) 10:20:52 JST
------------------------- REMOTE_ADDR = 184.145.80.187 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-treev-rr ------------------------- @@ -212,7 +212,7 @@ The following summary example demonstrates some of the points we learned in this 'Referencing Rows' chapter. (1) We manually created three levels deep tree view. (2) implemented the 'set_cell_data_func' code block for 'Age' tree view column which maps to model's column three, however, this is not explicitly stated when column is instantiated. Nevertheless, we obtain the age value from model via((*year_born=iter[2]*)), and generate the age of the person if it is a valid value. More interesting feature is how we handle foreground colour with the Gtk::CellRendererText#forefround_set and Gtk::CellRendererText#forgeground= methods. (3) Use virtual tree view column with title or header 'Path & Depth', which has no corresponding model column. In it we display depth and path values for each row. And lastly: (4) in the button we test, if we can access a row in the tree view by providing a string value "2:0:1" for path by retrieving its tree row reference. -((*manually-build-multilevel-tview-depthNpath.rb*)) +((*manually-build-multilevel-tview-summary.rb*)) {{br}} #!/usr/bin/env ruby