1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/ext/gtk/test3.rb
(no author) f12baed5df This commit was manufactured by cvs2svn to create branch 'RUBY'.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/RUBY@9 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1998-01-16 12:19:22 +00:00

16 lines
320 B
Ruby

require 'gtk'
window = Gtk::FileSelection::new("file selection dialog")
window.position(Gtk::WIN_POS_MOUSE)
window.border_width(0)
window.ok_button.signal_connect("clicked") do
print window.get_filename, "\n"
end
window.cancel_button.signal_connect("clicked") do
window.destroy
exit
end
window.show
Gtk::main()