ruby-****@sourc*****
ruby-****@sourc*****
2012年 9月 8日 (土) 21:05:11 JST
------------------------- REMOTE_ADDR = 184.145.80.187 REMOTE_HOST = URL = http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-txtw-itrsmrks ------------------------- @@ -596,6 +596,13 @@ window.show_all Gtk.main +As mentioned above, you should consult the next page ((<(Text Tags)|tut-gtk2-txtw-ttags>)) to understand all the code here. Let me only point out the two relevant pieces of code: + + textview.buffer.create_tag("highlight", {"background" => "#f8d60d", "foreground" => "red"}) + +and in the method ((*search(ent, txtvu):*)) + + txtvu.buffer.apply_tag("highlight", first, last) === Scrolling the Text Buffer