aboutsummaryrefslogtreecommitdiffstats
path: root/ext/tk/sample/tkextlib/iwidgets/sample/scrolledframe.rb
blob: 91d22131c0fe8418b62c9733f5600555d7fd8b30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/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