summaryrefslogtreecommitdiff
path: root/ext/gtk/test3.rb
blob: d73f72f9fa67fbcd5f4642cc8d7f750ee28c918a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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()