summaryrefslogtreecommitdiff
path: root/ext/tk/sample/demos-jp/toolbar.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-06 03:56:38 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-06 03:56:38 +0000
commit287a34ae0dfc23e4158f67cb7783d239f202c368 (patch)
tree5e35d5b41aae961b37cf6632f60c42f51c7aa775 /ext/tk/sample/demos-jp/toolbar.rb
parent9b52ae2e6491bb5d6c59e1799449f6268baf6f89 (diff)
* {ext,lib,test}/**/*.rb: removed trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/sample/demos-jp/toolbar.rb')
-rw-r--r--ext/tk/sample/demos-jp/toolbar.rb30
1 files changed, 15 insertions, 15 deletions
diff --git a/ext/tk/sample/demos-jp/toolbar.rb b/ext/tk/sample/demos-jp/toolbar.rb
index 1bb265d1f8..570d52704f 100644
--- a/ext/tk/sample/demos-jp/toolbar.rb
+++ b/ext/tk/sample/demos-jp/toolbar.rb
@@ -7,7 +7,7 @@
# based on "Id: toolbar.tcl,v 1.3 2007/12/13 15:27:07 dgp Exp"
if defined?($toolbar_demo) && $toolbar_demo
- $toolbar_demo.destroy
+ $toolbar_demo.destroy
$toolbar_demo = nil
end
@@ -86,28 +86,28 @@ end
text = TkText.new(base_frame, :width=>40, :height=>10)
## Toolbar contents
-tb_btn = Ttk::Button.new(tbar_base, :text=>'ボタン', :style=>'Toolbutton',
+tb_btn = Ttk::Button.new(tbar_base, :text=>'ボタン', :style=>'Toolbutton',
:command=>proc{
text.insert(:end, "ボタンが押されました.\n")
})
-tb_chk = Ttk::Checkbutton.new(tbar_base, :text=>'チェックボタン',
- :style=>'Toolbutton',
- :variable=>(check = TkVariable.new),
+tb_chk = Ttk::Checkbutton.new(tbar_base, :text=>'チェックボタン',
+ :style=>'Toolbutton',
+ :variable=>(check = TkVariable.new),
:command=>proc{
text.insert(:end, "チェックボタンの値は#{check.value}です.\n")
})
tb_mbtn = Ttk::Menubutton.new(tbar_base, :text=>'メニュー')
-tb_combo = Ttk::Combobox.new(tbar_base, :value=>TkFont.families,
+tb_combo = Ttk::Combobox.new(tbar_base, :value=>TkFont.families,
:state=>:readonly)
tb_mbtn.menu(menu = Tk::Menu.new(tb_mbtn))
menu.add(:command, :label=>'Just', :command=>proc{text.insert(:end, "Just\n")})
menu.add(:command, :label=>'An', :command=>proc{text.insert(:end, "An\n")})
-menu.add(:command, :label=>'Example',
+menu.add(:command, :label=>'Example',
:command=>proc{text.insert(:end, "Example\n")})
tb_combo.bind('<ComboboxSelected>'){ text.font.family = tb_combo.get }
## Arrange contents
-Tk.grid(tb_btn, tb_chk, tb_mbtn, tb_combo,
+Tk.grid(tb_btn, tb_chk, tb_mbtn, tb_combo,
:in=>contents, :padx=>2, :sticky=>'ns')
Tk.grid(tbar_base, :sticky=>'ew')
Tk.grid(sep, :sticky=>'ew')
@@ -120,16 +120,16 @@ base_frame.grid_columnconfigure(text, :weight=>1)
Ttk::Frame.new(base_frame) {|frame|
sep = Ttk::Separator.new(frame)
Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
- TkGrid('x',
- Ttk::Button.new(frame, :text=>'コード参照',
- :image=>$image['view'], :compound=>:left,
- :command=>proc{showCode 'toolbar'}),
- Ttk::Button.new(frame, :text=>'閉じる',
- :image=>$image['delete'], :compound=>:left,
+ TkGrid('x',
+ Ttk::Button.new(frame, :text=>'コード参照',
+ :image=>$image['view'], :compound=>:left,
+ :command=>proc{showCode 'toolbar'}),
+ Ttk::Button.new(frame, :text=>'閉じる',
+ :image=>$image['delete'], :compound=>:left,
:command=>proc{
$toolbar_demo.destroy
$toolbar_demo = nil
- }),
+ }),
:padx=>4, :pady=>4)
grid_columnconfigure(0, :weight=>1)
Tk.grid(frame, :sticky=>'ew')