diff options
author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-10-11 04:51:21 +0000 |
---|---|---|
committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-10-11 04:51:21 +0000 |
commit | 3514110b89bee5c37e308b4ca887e66dfe841456 (patch) | |
tree | d280d8542cc44d1cd1a75e8ec87b1f9d231561b7 /ext/tk/sample/demos-en/radio3.rb | |
parent | 05f5928c9d0f094d1e7e21a9bd9d8a8fc2f1a805 (diff) | |
download | ruby-3514110b89bee5c37e308b4ca887e66dfe841456.tar.gz |
* ext/tk/lib/tk/*: untabify
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/sample/demos-en/radio3.rb')
-rw-r--r-- | ext/tk/sample/demos-en/radio3.rb | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/ext/tk/sample/demos-en/radio3.rb b/ext/tk/sample/demos-en/radio3.rb index ca0453416c..70c4abb3b5 100644 --- a/ext/tk/sample/demos-en/radio3.rb +++ b/ext/tk/sample/demos-en/radio3.rb @@ -36,43 +36,43 @@ align = TkVariable.new # frame TkFrame.new($radio3_demo) {|frame| TkGrid(TkFrame.new(frame, :height=>2, :relief=>:sunken, :bd=>2), - :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2) + :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2) TkGrid('x', - TkButton.new(frame, :text=>'See Variables', - :image=>$image['view'], :compound=>:left, - :command=>proc{ - showVars($radio3_demo, ['size', size], - ['color', color], ['compound', align]) - }), - TkButton.new(frame, :text=>'See Code', - :image=>$image['view'], :compound=>:left, - :command=>proc{showCode 'radio3'}), - TkButton.new(frame, :text=>'Dismiss', - :image=>$image['delete'], :compound=>:left, - :command=>proc{ - tmppath = $radio3_demo - $radio3_demo = nil - $showVarsWin[tmppath.path] = nil - tmppath.destroy - }), - :padx=>4, :pady=>4) + TkButton.new(frame, :text=>'See Variables', + :image=>$image['view'], :compound=>:left, + :command=>proc{ + showVars($radio3_demo, ['size', size], + ['color', color], ['compound', align]) + }), + TkButton.new(frame, :text=>'See Code', + :image=>$image['view'], :compound=>:left, + :command=>proc{showCode 'radio3'}), + TkButton.new(frame, :text=>'Dismiss', + :image=>$image['delete'], :compound=>:left, + :command=>proc{ + tmppath = $radio3_demo + $radio3_demo = nil + $showVarsWin[tmppath.path] = nil + tmppath.destroy + }), + :padx=>4, :pady=>4) frame.grid_columnconfigure(0, :weight=>1) TkGrid(frame, :row=>3, :column=>0, :columnspan=>3, :sticky=>'nsew') } # frame f_left = TkLabelFrame.new($radio3_demo, 'text'=>'Point Size', - 'pady'=>2, 'padx'=>2) + 'pady'=>2, 'padx'=>2) f_mid = TkLabelFrame.new($radio3_demo, 'text'=>'Color', - 'pady'=>2, 'padx'=>2) + 'pady'=>2, 'padx'=>2) f_right = TkLabelFrame.new($radio3_demo, 'text'=>'Alignment', - 'pady'=>2, 'padx'=>2) + 'pady'=>2, 'padx'=>2) f_left .grid('column'=>0, 'row'=>1, 'pady'=>'.5c', 'padx'=>'.5c', 'rowspan'=>2) f_mid .grid('column'=>1, 'row'=>1, 'pady'=>'.5c', 'padx'=>'.5c', 'rowspan'=>2) f_right.grid('column'=>2, 'row'=>1, 'pady'=>'.5c', 'padx'=>'.5c') TkButton.new($radio3_demo, 'text'=>'Tristate', - 'command'=>proc{size.value = 'multi'; color.value = 'multi'}){ + 'command'=>proc{size.value = 'multi'; color.value = 'multi'}){ grid('column'=>2, 'row'=>2, 'pady'=>'.5c', 'padx'=>'.5c') } @@ -100,13 +100,13 @@ TkButton.new($radio3_demo, 'text'=>'Tristate', } label = TkLabel.new(f_right, 'text'=>'Label', 'bitmap'=>'questhead', - 'compound'=>'left') + 'compound'=>'left') label.configure('width'=>TkWinfo.reqwidth(label), 'compound'=>'top') label.height(TkWinfo.reqheight(label)) a_btn = ['Top', 'Left', 'Right', 'Bottom'].collect{|a| TkRadioButton.new(f_right, 'text'=>a, 'variable'=>align, 'relief'=>'flat', - 'value'=>a.downcase, 'indicatoron'=>0, 'width'=>7, - 'command'=>proc{label.compound(align.value)}) + 'value'=>a.downcase, 'indicatoron'=>0, 'width'=>7, + 'command'=>proc{label.compound(align.value)}) } Tk.grid('x', a_btn[0]) |