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
gtk3-4.2.4 sample/misc/togglebutton.rb
gtk3-4.2.3 sample/misc/togglebutton.rb
gtk3-4.2.2 sample/misc/togglebutton.rb
gtk3-4.2.1 sample/misc/togglebutton.rb
gtk3-4.2.0 sample/misc/togglebutton.rb
gtk3-4.1.9 sample/misc/togglebutton.rb
gtk3-4.1.8 sample/misc/togglebutton.rb
gtk3-4.1.7 sample/misc/togglebutton.rb
gtk3-4.1.6 sample/misc/togglebutton.rb
gtk3-4.1.5 sample/misc/togglebutton.rb
gtk3-4.1.4 sample/misc/togglebutton.rb
gtk3-4.1.3 sample/misc/togglebutton.rb
gtk3-4.1.2 sample/misc/togglebutton.rb
gtk3-4.1.1 sample/misc/togglebutton.rb
gtk3-4.1.0 sample/misc/togglebutton.rb
gtk3-4.0.9 sample/misc/togglebutton.rb
gtk3-4.0.8 sample/misc/togglebutton.rb
gtk3-4.0.7 sample/misc/togglebutton.rb
gtk3-4.0.6 sample/misc/togglebutton.rb
gtk3-4.0.5 sample/misc/togglebutton.rb