ruby-****@sourc*****
ruby-****@sourc*****
2012年 9月 9日 (日) 07:11:16 JST
------------------------- REMOTE_ADDR = 184.145.80.187 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-txtw-itrsmrks ------------------------- @@ -186,7 +186,7 @@ Gtk::TextBuffer#.text = "Some text" -Subsequently we've learned how to manipulate the entire buffer. However, it is also useful to edit just a portion of a document. There are quite a number of such methods available to you. The simplest of all is Gtk::TextBuffer#insert(iter, text). It will insert the text at the insertion point pointed at by the iter, and emit the ((*insert-text*)) signal. After insertion the iter will point at the point immediately after the inserted text. +Subsequently we've learned how to manipulate the entire buffer. However, it is also useful to edit just a portion of a document. There are quite a number of such methods available to you. The simplest of all is Gtk::TextBuffer#insert(iter, text). It will insert the text at the insertion point pointed at by the iter, and emit the ((*insert-text*)) signal. After insertion the iter will be invalidated, however, default signal handler revalidates it to point to the end of the inserted text. Do not miss this last point, namely, that iter will finally point at the position immediately after the inserted text!