summaryrefslogtreecommitdiff
path: root/ruby_1_8_6/ext/tk/sample/tkextlib/iwidgets/sample/finddialog.rb
blob: 110efb9b968bb450765ce0dc9de4efc16005e172 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env ruby
require 'tk'
require 'tkextlib/iwidgets'

mainloop = Thread.new{Tk.mainloop}

st = Tk::Iwidgets::Scrolledtext.new.pack
st.insert('end', "Now is the time for all good men\n")
st.insert('end', "to come to the aid of their country")

fd = Tk::Iwidgets::Finddialog.new(:textwidget=>st)
fd.center(st)
fd.activate

mainloop.join