Sha256: 8190d2ec22455eac27404126568039696d998d3d10d0b7213649251b69dbba27

Contents?: true

Size: 722 Bytes

Versions: 151

Compression:

Stored size: 722 Bytes

Contents

#!/usr/bin/env ruby
=begin
  togglebutton.rb - Ruby/GTK 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::ToggleButton sample")
window.border_width = 10

box = Gtk::Box.new(:vertical, 10)
window.add(box)

button1 = Gtk::ToggleButton.new(:label => "_button1", :use_underline => true)
button2 = Gtk::ToggleButton.new(:label => "_button2", :use_underline => false)
box.add(button1)
box.add(button2)

box.pack_start(Gtk::Separator.new(:horizontal))

close = Gtk::Button.new(:label => "close")
close.signal_connect("clicked") do
  Gtk.main_quit
end
box.add(close)

window.show_all

Gtk.main

Version data entries

151 entries across 143 versions & 2 rubygems

Version Path
savant-echo-1.0.4 bin/packaging/vendor/ruby/2.2.0/gems/gtk3-3.1.0/sample/misc/togglebutton.rb
savant-echo-1.0.4 bin/alexa-0.1.2-osx/lib/vendor/ruby/2.2.0/gems/gtk3-3.1.0/sample/misc/togglebutton.rb
gtk3-3.1.1-x64-mingw32 sample/misc/togglebutton.rb
gtk3-3.1.1-x86-mingw32 sample/misc/togglebutton.rb
gtk3-3.1.1 sample/misc/togglebutton.rb
savant-echo-1.0.1 bin/alexa-0.1.2-osx/lib/vendor/ruby/2.2.0/gems/gtk3-3.1.0/sample/misc/togglebutton.rb
savant-echo-1.0.1 bin/packaging/vendor/ruby/2.2.0/gems/gtk3-3.1.0/sample/misc/togglebutton.rb
savant-echo-0.1.91 bin/alexa-0.1.2-osx/lib/vendor/ruby/2.2.0/gems/gtk3-3.1.0/sample/misc/togglebutton.rb
savant-echo-0.1.91 bin/packaging/vendor/ruby/2.2.0/gems/gtk3-3.1.0/sample/misc/togglebutton.rb
savant-echo-0.1.9 bin/packaging/vendor/ruby/2.2.0/gems/gtk3-3.1.0/sample/misc/togglebutton.rb
savant-echo-0.1.9 bin/alexa-0.1.2-osx/lib/vendor/ruby/2.2.0/gems/gtk3-3.1.0/sample/misc/togglebutton.rb
savant-echo-0.1.6 bin/packaging/vendor/ruby/2.2.0/gems/gtk3-3.1.0/sample/misc/togglebutton.rb
savant-echo-0.1.6 bin/alexa-0.1.2-osx/lib/vendor/ruby/2.2.0/gems/gtk3-3.1.0/sample/misc/togglebutton.rb
savant-echo-0.1.5 bin/alexa-0.1.2-osx/lib/vendor/ruby/2.2.0/gems/gtk3-3.1.0/sample/misc/togglebutton.rb
savant-echo-0.1.5 bin/packaging/vendor/ruby/2.2.0/gems/gtk3-3.1.0/sample/misc/togglebutton.rb
savant-echo-0.1.4 bin/alexa-0.1.2-osx/lib/vendor/ruby/2.2.0/gems/gtk3-3.1.0/sample/misc/togglebutton.rb
savant-echo-0.1.4 bin/packaging/vendor/ruby/2.2.0/gems/gtk3-3.1.0/sample/misc/togglebutton.rb
savant-echo-0.1.3 bin/packaging/vendor/ruby/2.2.0/gems/gtk3-3.1.0/sample/misc/togglebutton.rb
savant-echo-0.1.3 bin/alexa-0.1.2-osx/lib/vendor/ruby/2.2.0/gems/gtk3-3.1.0/sample/misc/togglebutton.rb
gtk3-3.1.0-x64-mingw32 sample/misc/togglebutton.rb