1#!/usr/bin/env ruby 2require 'tk' 3require 'tkextlib/iwidgets' 4 5mainloop = Thread.new{Tk.mainloop} 6 7st = Tk::Iwidgets::Scrolledtext.new.pack 8st.insert('end', "Now is the time for all good men\n") 9st.insert('end', "to come to the aid of their country") 10 11fd = Tk::Iwidgets::Finddialog.new(:textwidget=>st) 12fd.center(st) 13fd.activate 14 15mainloop.join 16