HEX
Server: Apache
System: Linux s198.coreserver.jp 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC 2025 x86_64
User: nagasaki (10062)
PHP: 7.1.33
Disabled: NONE
Upload Files
File: //usr/local/rvm/src/ruby-2.3.8/ext/tk/sample/tkextlib/iwidgets/sample/scrolledframe.rb
#!/usr/bin/env ruby
# frozen_string_literal: false
require 'tk'
require 'tkextlib/iwidgets'

sf = Tk::Iwidgets::Scrolledframe.new(:width=>150, :height=>180,
                                     :labeltext=>'scrolledframe')
cs = sf.child_site

TkButton.new(cs, :text=>'Hello').pack(:pady=>10)
TkButton.new(cs, :text=>'World').pack(:pady=>10)
TkButton.new(cs, :text=>'This is a test').pack(:pady=>10)
TkButton.new(cs, :text=>'This is a really big button').pack(:pady=>10)
TkButton.new(cs, :text=>'This is another really big button').pack(:pady=>10)
TkButton.new(cs, :text=>'This is the last really big button').pack(:pady=>10)

sf.pack(:expand=>true, :fill=>:both, :padx=>10, :pady=>10)

Tk.mainloop