diff options
Diffstat (limited to 'ext/tk/sample/demos-jp/ttkpane.rb')
-rw-r--r-- | ext/tk/sample/demos-jp/ttkpane.rb | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/ext/tk/sample/demos-jp/ttkpane.rb b/ext/tk/sample/demos-jp/ttkpane.rb index 96670c0e5c..a7b458a683 100644 --- a/ext/tk/sample/demos-jp/ttkpane.rb +++ b/ext/tk/sample/demos-jp/ttkpane.rb @@ -7,7 +7,7 @@ # based on "Id: ttkpane.tcl,v 1.3 2007/12/13 15:27:07 dgp Exp" if defined?($ttkpane_demo) && $ttkpane_demo - $ttkpane_demo.destroy + $ttkpane_demo.destroy $ttkpane_demo = nil end @@ -19,7 +19,7 @@ $ttkpane_demo = TkToplevel.new {|w| base_frame = TkFrame.new($ttkpane_demo).pack(:fill=>:both, :expand=>true) -Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'4i', :justify=>:left, +Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'4i', :justify=>:left, :text=><<EOL).pack(:side=>:top, :fill=>:x) このデモは,埋め込み関係にあるテーマ付きペインドウィンドウを示しています.\ それぞれの大きさは,含まれているペインの間にあるエリアをつかんで\ @@ -32,16 +32,16 @@ Ttk::Separator.new(base_frame).pack(:side=>:top, :fill=>:x) 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 'ttkpane'}), - 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 'ttkpane'}), + Ttk::Button.new(frame, :text=>'閉じる', + :image=>$image['delete'], :compound=>:left, :command=>proc{ $ttkpane_demo.destroy $ttkpane_demo = nil - }), + }), :padx=>4, :pady=>4) grid_columnconfigure(0, :weight=>1) pack(:side=>:bottom, :fill=>:x) @@ -61,26 +61,26 @@ if Tk.windowingsystem == 'aqua' end # Fill the button pane -Ttk::Button.new(left_top, :text=>'押してね', +Ttk::Button.new(left_top, :text=>'押してね', :command=>proc{ - Tk.messageBox(:type=>'ok', :icon=>'info', - :message=>'いてて!', - :detail=>'That hurt...', :parent=>base_frame, + Tk.messageBox(:type=>'ok', :icon=>'info', + :message=>'いてて!', + :detail=>'That hurt...', :parent=>base_frame, :title=>'Button Pressed') }).pack(:padx=>2, :pady=>5) zones_list = [ - [':Europe/Berlin'], - [':America/Argentina/Buenos_Aires', ':America/Buenos_Aires'], - [':Africa/Johannesburg'], - [':Europe/London'], - [':America/Los_Angeles'], + [':Europe/Berlin'], + [':America/Argentina/Buenos_Aires', ':America/Buenos_Aires'], + [':Africa/Johannesburg'], + [':Europe/London'], + [':America/Los_Angeles'], [':Europe/Moscow'], - [':America/New_York'], - [':Asia/Singapore'], - [':Australia/Sydney'], - [':Asia/Tokyo'], + [':America/New_York'], + [':Asia/Singapore'], + [':Australia/Sydney'], + [':Asia/Tokyo'], ] zones = [] @@ -158,7 +158,7 @@ time = TkVariable.new_hash case tzinfo when :tcl update_proc = proc{|now, tz, label| - time[label] = Tk.tk_call('clock', 'format', now.tv_sec, + time[label] = Tk.tk_call('clock', 'format', now.tv_sec, '-timezone', tz, '-format', '%T') } when :tzinfo @@ -179,7 +179,7 @@ end zones.each_with_index{|(zone, label), idx| Ttk::Separator.new(left_bot).pack(:fill=>:x) if idx > 0 Ttk::Label.new(left_bot, :text=>label, :anchor=>'w').pack(:fill=>:x) - Ttk::Label.new(left_bot, :textvariable=>time.ref(label), + Ttk::Label.new(left_bot, :textvariable=>time.ref(label), :anchor=>'w').pack(:fill=>:x) } |