1 2 3 4 5 6 7 8 9 10 11 12
#!/usr/bin/env ruby require 'tk' require 'tkextlib/iwidgets' mainloop = Thread.new{Tk.mainloop} TkButton.new(:text=>'QUIT', :command=>proc{Tk.root.destroy}).pack(:padx=>10, :pady=>10) Tk::Iwidgets::Selectiondialog.new.activate mainloop.join