Sha256: 4604ab781bf8ffc5d2d4d4e9f7e8e1719ccae0c50ee3211e213e0eeae636f221

Contents?: true

Size: 664 Bytes

Versions: 38

Compression:

Stored size: 664 Bytes

Contents

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

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

  $Id: button2.rb,v 1.4 2006/06/17 13:18:12 mutoh Exp $
=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).set_default_size(100,100).show_all

Gtk.main

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
gtk3-2.2.5-x64-mingw32 sample/misc/button2.rb
gtk3-2.2.5-x86-mingw32 sample/misc/button2.rb
gtk3-2.2.5 sample/misc/button2.rb
gtk3-2.2.4-x64-mingw32 sample/misc/button2.rb
gtk3-2.2.4-x86-mingw32 sample/misc/button2.rb
gtk3-2.2.4 sample/misc/button2.rb
gtk3-2.2.3-x86-mingw32 sample/misc/button2.rb
gtk3-2.2.3 sample/misc/button2.rb
gtk3-2.2.2-x86-mingw32 sample/misc/button2.rb
gtk3-2.2.2 sample/misc/button2.rb
gtk3-2.2.1-x86-mingw32 sample/misc/button2.rb
gtk3-2.2.1 sample/misc/button2.rb
gtk3-2.2.0-x86-mingw32 sample/misc/button2.rb
gtk3-2.2.0 sample/misc/button2.rb
gtk3-2.1.0-x86-mingw32 sample/misc/button2.rb
gtk3-2.1.0 sample/misc/button2.rb
gtk3-2.0.3-x86-mingw32 sample/misc/button2.rb
gtk3-2.0.3 sample/misc/button2.rb
gtk3-2.0.2-x86-mingw32 sample/misc/button2.rb
gtk3-2.0.2 sample/misc/button2.rb