summaryrefslogtreecommitdiff
path: root/ext/tk/sample/demos-jp/radio2.rb
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-23 05:22:13 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-23 05:22:13 +0000
commit61a68941b1d22973dfb832e0575596d53f3e31b4 (patch)
treead2e6871fc4bd6e4bfbfe2aa71b888e51a4b2261 /ext/tk/sample/demos-jp/radio2.rb
parent280f8df3706176fac38ef42e3fc79d30ac6e1e16 (diff)
Merge from ruby_1_8. Add files that have not been added yet.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_7@16554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/sample/demos-jp/radio2.rb')
-rw-r--r--ext/tk/sample/demos-jp/radio2.rb17
1 files changed, 10 insertions, 7 deletions
diff --git a/ext/tk/sample/demos-jp/radio2.rb b/ext/tk/sample/demos-jp/radio2.rb
index b89520cdc5..cf53e3e485 100644
--- a/ext/tk/sample/demos-jp/radio2.rb
+++ b/ext/tk/sample/demos-jp/radio2.rb
@@ -21,8 +21,10 @@ $radio2_demo = TkToplevel.new {|w|
positionWindow(w)
}
+base_frame = TkFrame.new($radio2_demo).pack(:fill=>:both, :expand=>true)
+
# label
-msg = TkLabel.new($radio2_demo) {
+msg = TkLabel.new(base_frame) {
font $font
wraplength '5i'
justify 'left'
@@ -36,7 +38,7 @@ color = TkVariable.new
align = TkVariable.new
# frame
-TkFrame.new($radio2_demo) {|frame|
+TkFrame.new(base_frame) {|frame|
TkButton.new(frame) {
#text '了解'
text '閉じる'
@@ -56,18 +58,18 @@ TkFrame.new($radio2_demo) {|frame|
TkButton.new(frame) {
text '変数参照'
command proc{
- showVars($radio2_demo,
+ showVars(base_frame,
['size', size], ['color', color], ['compound', align])
}
}.pack('side'=>'left', 'expand'=>'yes')
}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
# frame
-f_left = TkLabelFrame.new($radio2_demo, 'text'=>'文字サイズ',
+f_left = TkLabelFrame.new(base_frame, 'text'=>'文字サイズ',
'pady'=>2, 'padx'=>2)
-f_mid = TkLabelFrame.new($radio2_demo, 'text'=>'色',
+f_mid = TkLabelFrame.new(base_frame, 'text'=>'色',
'pady'=>2, 'padx'=>2)
-f_right = TkLabelFrame.new($radio2_demo, 'text'=>'ビットマップ配置',
+f_right = TkLabelFrame.new(base_frame, 'text'=>'ビットマップ配置',
'pady'=>2, 'padx'=>2)
f_left.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'.5c', 'pady'=>'.5c')
f_mid.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'.5c', 'pady'=>'.5c')
@@ -93,7 +95,8 @@ f_right.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'.5c', 'pady'=>'.5c')
}.pack('side'=>'top', 'pady'=>2, 'fill'=>'x')
}
-label = TkLabel.new(f_right, 'text'=>'ラベル', 'bitmap'=>'questhead',
+# label = TkLabel.new(f_right, 'text'=>'ラベル', 'bitmap'=>'questhead',
+label = Tk::Label.new(f_right, 'text'=>'ラベル', 'bitmap'=>'questhead',
'compound'=>'left')
label.configure('width'=>TkWinfo.reqwidth(label), 'compound'=>'top')
label.height(TkWinfo.reqheight(label))