ruby-****@sourc*****
ruby-****@sourc*****
2012年 9月 5日 (水) 09:40:06 JST
------------------------- REMOTE_ADDR = 70.49.49.99 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-txtw-textview ------------------------- @@ -82,7 +82,7 @@ -Most new text views are created with the Gtk::TextView.new(buffer=nil). When using this method with the default nil argument an empty Gtk::TextBuffer is created for you. This empty text buffer can be replaced or retrieved by "Gtk::TextView#buffer=(buff)", or "Gtk::TextView#set_buffer(buff)", and "buff = Gtk::TextView#buffer" respectively. With the former two methods the contents of the buffer gets completely replaced. However, as we will see in the following page((*Text Iterators and Marks,*))one can also cause changes to a text buffer only partially. +Most new text views are created with the Gtk::TextView.new(buffer=nil). When using this method with the default nil argument an empty Gtk::TextBuffer is created for you. This empty text buffer can be replaced or retrieved by "Gtk::TextView#buffer=(buff)", or "Gtk::TextView#set_buffer(buff)", and "buff = Gtk::TextView#buffer" respectively. With the former two methods the contents of the buffer gets completely replaced. However, as we will see in the following page in paragraphs entitled((*Text Iterators and Marks,*))one can also cause changes to a text buffer only partially. Recall that we have pointed out that a few widgets provide native scrolling support. Well, Gtk::TextView is one of them. This means you should use Gtk::Container#add method, rather than Gtk::ScrolledWindow#add_with_viewport(child), to add Gtk::TextView to the scrolled windows.