ruby-****@sourc*****
ruby-****@sourc*****
2009年 2月 17日 (火) 07:44:49 JST
------------------------- REMOTE_ADDR = 74.15.84.244 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-treev-cdf ------------------------- @@ -1,11 +1,13 @@ = The Tree View Widget {{link "tut-gtk2-treev-etr", "tut-gtk2-treev", "tut-gtk", "tut-gtk2-treev-crs"}} == Cell Data Functions +{{image_right("treev-cdf-01.png")}} + 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: + -{{image_left("treev-cdf-01.png")}} {{br}} ((*celldatafunction.rb*))