ruby-****@sourc*****
ruby-****@sourc*****
2009年 2月 17日 (火) 09:06:58 JST
------------------------- REMOTE_ADDR = 74.15.84.244 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-treev-cdf ------------------------- @@ -7,6 +7,9 @@ If you need to further customize every cell before it is rendered to the screen, you can use cell data function Gtk::TreeViewColumn#set_cell_data_func(cell) {|tvc, cell, model, iter| ... } method. This method allows you to tinker with every property for each individual cell. For example, you example you can set the background colour based on the content of the cell, or format the numeric number to your liking, or perhaps only restricting the number of decimal places for a floating point. values. It can only be used for to set properties that are calculated during the run time. The next example will give you an idea how this can be done: +:Caution: + Make sure you do not use Gtk::TreeViewColumn#set_cell_data_func if you have a large number of rows in your tree model. Cell data functions are invoked on every cell in the column before it is rendered, so they can significantly slow down tree models. + {{br}}