This repository has been archived on 2021-09-15 . You can view files and clone it, but cannot push or open issues or pull requests.
28 lines
602 B
Ruby
28 lines
602 B
Ruby
#!/usr/bin/env ruby
|
|||
=begin
|
|||
expander.rb - Ruby/GTK2 sample script.
|
|||
|
|||
Copyright (c) 2004-2006 Ruby-GNOME2 Project Team
|
|||
This program is licenced under the same licence as Ruby-GNOME2.
|
|||
|
|||
$Id: expander.rb,v 1.3 2006/06/17 13:18:12 mutoh Exp $
|
|||
=end
|
|||
|
|||
require 'gtk2'
|
|||
|
|||
expander = Gtk::Expander.new("Expander Sample")
|
|||
expander.expanded = true
|
|||
|
|||
button = Gtk::Button.new("Hide this button.")
|
|||
button.signal_connect("clicked") do
|
|||
expander.expanded = false
|
|||
end
|
|||
|
|||
button.set_size_request(200, 200)
|
|||
expander.add(button)
|
|||
|
|||
Gtk::Window.new.add(expander).show_all.signal_connect("destroy"){Gtk.main_quit}
|
|||
|
|||
Gtk.main
|
|||
|