Sha256: d75c6f8585636a021772ba07a67ba73ef0f51dee7d03683bf13c508a8a1e3c75

Contents?: true

Size: 621 Bytes

Versions: 71

Compression:

Stored size: 621 Bytes

Contents

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

  Copyright (c) 2002-2015 Ruby-GNOME2 Project Team
  This program is licenced under the same licence as Ruby-GNOME2.
=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

71 entries across 63 versions & 2 rubygems

Version Path
gtk3-3.1.8-x64-mingw32 sample/misc/button2.rb
gtk3-3.1.8-x86-mingw32 sample/misc/button2.rb
gtk3-3.1.8 sample/misc/button2.rb
gtk3-3.1.7-x64-mingw32 sample/misc/button2.rb
gtk3-3.1.7-x86-mingw32 sample/misc/button2.rb
gtk3-3.1.7 sample/misc/button2.rb
gtk3-3.1.6-x64-mingw32 sample/misc/button2.rb
gtk3-3.1.6-x86-mingw32 sample/misc/button2.rb
gtk3-3.1.6 sample/misc/button2.rb
gtk3-3.1.5-x64-mingw32 sample/misc/button2.rb
gtk3-3.1.5-x86-mingw32 sample/misc/button2.rb
gtk3-3.1.4-x64-mingw32 sample/misc/button2.rb
gtk3-3.1.4-x86-mingw32 sample/misc/button2.rb
gtk3-3.1.4 sample/misc/button2.rb
gtk3-3.1.3-x64-mingw32 sample/misc/button2.rb
gtk3-3.1.3-x86-mingw32 sample/misc/button2.rb
gtk3-3.1.3 sample/misc/button2.rb
gtk3-3.1.2-x64-mingw32 sample/misc/button2.rb
gtk3-3.1.2-x86-mingw32 sample/misc/button2.rb
gtk3-3.1.2 sample/misc/button2.rb