ruby-****@sourc*****
ruby-****@sourc*****
2012年 8月 16日 (木) 03:39:03 JST
------------------------- REMOTE_ADDR = 70.49.49.99 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-treev-parts ------------------------- @@ -199,7 +199,16 @@ The Gtk::CellRenderer class provides common properties to all derived renderer classes including: background colour, size parameters, alignment, mode, visibility, sensitivity, and padding. You should check the API documentation for full list. It also provides ((*editing_canceled*)) and ((*editing-started*)) signals the former emitted when the user cancels the process of editing a cell, and the latter emitted when a cell is started to be edited. -Our example program introduces Gtk::CellRendererText class. This class provides a plethora of adittional properties and instance methods which you can use to alter the appearance of the display. So you will have an idea what instance methods, properties and signals are available to Gtk::CellRendererText objects, I will for your convenience list them at the end of this session. +###### foreground # -s- ########## +We have introduced the((*forefround*))colour attribute in our program here: + + renderer = Gtk::CellRendererText.new + renderer.foreground = "#ff0000" # or, you could also use colour name ("red") instead. + +It is important to understand, that this attribute sets the colour for the entire column. +###### foreground # -e- ########## + +Our example program introduces Gtk::CellRendererText class. This class provides a plethora of additional properties and instance methods which you can use to alter the appearance of the display. So you will have an idea what instance methods, properties and signals are available to Gtk::CellRendererText objects, I will for your convenience list them at the end of this session. column = Gtk::TreeViewColumn.new("Buy", renderer, "text" => BUY_IT) treeview.append_column(column)