Sha256: d3c659207e5c17c240cba19c3590eeac0f791a410e3a48ece9aaed83d2ae64f9

Contents?: true

Size: 1.04 KB

Versions: 198

Compression:

Stored size: 1.04 KB

Contents

# Copyright (c) 2003-2005 Ruby-GNOME2 Project Team
# This program is licenced under the same licence as Ruby-GNOME2.
# $Id: expander.rb,v 1.2 2005/02/25 17:09:25 kzys Exp $
=begin
= Expander (Expander)

GtkExpander allows to provide additional content that is initially hidden.
This is also known as "disclosure triangle".
=end

require 'common'

module Demo
  class Expander < Gtk::Dialog
    def initialize
      super('GtkExpander',
	    nil, # parent
	    0,
	    [Gtk::Stock::CLOSE, Gtk::Dialog::RESPONSE_NONE])
      self.resizable = false

      signal_connect('response') do
        self.destroy
      end

      vbox = Gtk::VBox.new(false, 5)
      self.vbox.pack_start(vbox, true, true)
      vbox.border_width = 5

      label = Gtk::Label.new('Expander demo. CLick on the triangle for details.')
      vbox.pack_start(label, false, false)

      # Create the expander
      expander = Gtk::Expander.new('Details')
      vbox.pack_start(expander, false, false)

      expander.add(Gtk::Label.new('Details can be shown or hidden.'))
    end
  end
end

Version data entries

198 entries across 198 versions & 2 rubygems

Version Path
gtk2-3.4.3 sample/gtk-demo/expander.rb
gtk2-3.4.2 sample/gtk-demo/expander.rb
gtk2-3.4.1 sample/gtk-demo/expander.rb
gtk2-3.4.0 sample/gtk-demo/expander.rb
gtk2-3.3.9 sample/gtk-demo/expander.rb
gtk2-3.3.8 sample/gtk-demo/expander.rb
gtk2-3.3.7 sample/gtk-demo/expander.rb
gtk2-3.3.6 sample/gtk-demo/expander.rb
gtk2-3.3.5 sample/gtk-demo/expander.rb
gtk2-3.3.4 sample/gtk-demo/expander.rb
gtk2-3.3.3 sample/gtk-demo/expander.rb
gtk2-3.3.2 sample/gtk-demo/expander.rb
gtk2-3.3.1 sample/gtk-demo/expander.rb
gtk2-3.3.0 sample/gtk-demo/expander.rb
gtk2-3.2.9-x64-mingw32 sample/gtk-demo/expander.rb
gtk2-3.2.9-x86-mingw32 sample/gtk-demo/expander.rb
gtk2-3.2.9 sample/gtk-demo/expander.rb
gtk2-3.2.8-x64-mingw32 sample/gtk-demo/expander.rb
gtk2-3.2.8-x86-mingw32 sample/gtk-demo/expander.rb
gtk2-3.2.8 sample/gtk-demo/expander.rb