This repository has been archived on 2021-09-15. You can view files and clone it, but cannot push or open issues or pull requests.
DUT2Curling/v/Vue1.rb
Quentin d2a45c0be2 new file: c/.main.rb.kate-swp
new file:   c/ff
	new file:   c/main.rb
	new file:   lib/gtk2.rb
	new file:   lib/gtk2/base.rb
	new file:   lib/net/external.rb
	new file:   lib/net/helper.rb
	new file:   lib/net/http.rb
	new file:   lib/net/icmp.rb
	new file:   lib/net/ping.rb
	new file:   lib/net/tcp.rb
	new file:   lib/net/udp.rb
	new file:   lib/net/wmi.rb
	new file:   m/ReadFile.rb
	new file:   v/Vue1.rb
	new file:   v/VueError.rb
2013-12-13 11:14:02 +01:00

41 lines
772 B
Ruby

class Vue1
def initialize()
@window = Gtk::Window.new
@window.set_title('Saisie nom fichier')
vb = Gtk::VBox.new(true, 6)
hb = Gtk::HBox.new(false, 6)
val = Gtk::Label.new('Nom');
hb.pack_start(val, false, true, 6)
@nom = Gtk::Entry.new
hb.pack_start(@nom, true, true)
@b = Gtk::Button.new('OK')
hb.pack_start(@b)
vb.pack_start(hb)
@window.add(vb)
end
def getWindow
return @window
end
def getEntry
return @chaine
end
def listenerDestroy
@window.signal_connect('destroy') {
@window.destroy
Gtk.main_quit
}
end
def listenerBouton
@chaine = " "
@b.signal_connect('clicked'){
@chaine = @nom.text.to_s
@window.destroy
Gtk.main_quit
}
end
end