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-3.0.3-x64-mingw32 sample/misc/togglebutton.rb
gtk3-3.0.3-x86-mingw32 sample/misc/togglebutton.rb
gtk3-3.0.3 sample/misc/togglebutton.rb
gtk3-3.0.2-x86-mingw32 sample/misc/togglebutton.rb
gtk3-3.0.2-x64-mingw32 sample/misc/togglebutton.rb
gtk3-3.0.2 sample/misc/togglebutton.rb
gtk3-3.0.1-x86-mingw32 sample/misc/togglebutton.rb
gtk3-3.0.1-x64-mingw32 sample/misc/togglebutton.rb
gtk3-3.0.1 sample/misc/togglebutton.rb
gtk3-3.0.0-x86-mingw32 sample/misc/togglebutton.rb
gtk3-3.0.0-x64-mingw32 sample/misc/togglebutton.rb