summaryrefslogtreecommitdiff
path: root/ext/tk/sample/demos-jp/radio2.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tk/sample/demos-jp/radio2.rb')
-rw-r--r--ext/tk/sample/demos-jp/radio2.rb28
1 files changed, 14 insertions, 14 deletions
diff --git a/ext/tk/sample/demos-jp/radio2.rb b/ext/tk/sample/demos-jp/radio2.rb
index cf53e3e485..91496beb6d 100644
--- a/ext/tk/sample/demos-jp/radio2.rb
+++ b/ext/tk/sample/demos-jp/radio2.rb
@@ -10,7 +10,7 @@
# toplevel widget
if defined?($radio2_demo) && $radio2_demo
- $radio2_demo.destroy
+ $radio2_demo.destroy
$radio2_demo = nil
end
@@ -23,7 +23,7 @@ $radio2_demo = TkToplevel.new {|w|
base_frame = TkFrame.new($radio2_demo).pack(:fill=>:both, :expand=>true)
-# label
+# label
msg = TkLabel.new(base_frame) {
font $font
wraplength '5i'
@@ -32,12 +32,12 @@ msg = TkLabel.new(base_frame) {
}
msg.pack('side'=>'top')
-#
+#
size = TkVariable.new
color = TkVariable.new
align = TkVariable.new
-# frame
+# frame
TkFrame.new(base_frame) {|frame|
TkButton.new(frame) {
#text '了解'
@@ -58,24 +58,24 @@ TkFrame.new(base_frame) {|frame|
TkButton.new(frame) {
text '変数参照'
command proc{
- showVars(base_frame,
+ 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(base_frame, 'text'=>'文字サイズ',
+# frame
+f_left = TkLabelFrame.new(base_frame, 'text'=>'文字サイズ',
'pady'=>2, 'padx'=>2)
-f_mid = TkLabelFrame.new(base_frame, 'text'=>'色',
+f_mid = TkLabelFrame.new(base_frame, 'text'=>'色',
'pady'=>2, 'padx'=>2)
-f_right = TkLabelFrame.new(base_frame, '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')
f_right.pack('side'=>'left', 'expand'=>'yes', 'padx'=>'.5c', 'pady'=>'.5c')
-# radiobutton
+# radiobutton
[10, 12, 18, 24].each {|sz|
TkRadioButton.new(f_left) {
text "ポイントサイズ #{sz}"
@@ -95,15 +95,15 @@ 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 = Tk::Label.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))
abtn = ['Top', 'Left', 'Right', 'Bottom'].collect{|a|
lower = a.downcase
- TkRadioButton.new(f_right, 'text'=>a, 'variable'=>align, 'relief'=>'flat',
- 'value'=>lower, 'indicatoron'=>0, 'width'=>7,
+ TkRadioButton.new(f_right, 'text'=>a, 'variable'=>align, 'relief'=>'flat',
+ 'value'=>lower, 'indicatoron'=>0, 'width'=>7,
'command'=>proc{label.compound(align.value)})
}