Sha256: 2e2455357e17d3b0597f925dea06bbb0f17e61839ff1dce935a1154ce1386d6b

Contents?: true

Size: 617 Bytes

Versions: 35

Compression:

Stored size: 617 Bytes

Contents

#!/usr/bin/env ruby
=begin
  button2.rb - Ruby/GTK2 sample script.

  Copyright (c) 2002-2020 Ruby-GNOME2 Project Team
  This program is licenced under the same licence as Ruby-GNOME.
=end

require "gtk3"

window = Gtk::Window.new("Gtk::Button sample")

button1 = Gtk::Button.new(:mnemonic => "_HELLO")
button2 = Gtk::Button.new(:label => "_HELLO")
button3 = Gtk::Button.new(:stock_id => Gtk::Stock::QUIT)

button3.signal_connect("clicked"){ Gtk.main_quit }

box = Gtk::Box.new(:vertical)
box.add(button1)
box.add(button2)
box.add(button3)

window.add(box)
window.set_default_size(100, 100)
window.show_all

Gtk.main

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
gtk3-4.2.4 sample/misc/button2.rb
gtk3-4.2.3 sample/misc/button2.rb
gtk3-4.2.2 sample/misc/button2.rb
gtk3-4.2.1 sample/misc/button2.rb
gtk3-4.2.0 sample/misc/button2.rb
gtk3-4.1.9 sample/misc/button2.rb
gtk3-4.1.8 sample/misc/button2.rb
gtk3-4.1.7 sample/misc/button2.rb
gtk3-4.1.6 sample/misc/button2.rb
gtk3-4.1.5 sample/misc/button2.rb
gtk3-4.1.4 sample/misc/button2.rb
gtk3-4.1.3 sample/misc/button2.rb
gtk3-4.1.2 sample/misc/button2.rb
gtk3-4.1.1 sample/misc/button2.rb
gtk3-4.1.0 sample/misc/button2.rb
gtk3-4.0.9 sample/misc/button2.rb
gtk3-4.0.8 sample/misc/button2.rb
gtk3-4.0.7 sample/misc/button2.rb
gtk3-4.0.6 sample/misc/button2.rb
gtk3-4.0.5 sample/misc/button2.rb