summaryrefslogtreecommitdiff
path: root/ext/tk/sample/demos-jp/plot.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/plot.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/plot.rb')
-rw-r--r--ext/tk/sample/demos-jp/plot.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/tk/sample/demos-jp/plot.rb b/ext/tk/sample/demos-jp/plot.rb
index dbca3e971c..9ff71904cd 100644
--- a/ext/tk/sample/demos-jp/plot.rb
+++ b/ext/tk/sample/demos-jp/plot.rb
@@ -16,14 +16,16 @@ $plot_demo = TkToplevel.new {|w|
positionWindow(w)
}
+base_frame = TkFrame.new($plot_demo).pack(:fill=>:both, :expand=>true)
+
# label 生成
-TkLabel.new($plot_demo, 'font'=>$font, 'wraplength'=>'4i', 'justify'=>'left',
+TkLabel.new(base_frame, 'font'=>$font, 'wraplength'=>'4i', 'justify'=>'left',
'text'=>"このウィンドウは簡単な2次元のプロットを含んだキャンバス widgetです。表示された点をマウスボタン1でドラッグしてデータをいじることができます。"){
pack('side'=>'top')
}
# frame 生成
-$plot_buttons = TkFrame.new($plot_demo) {|frame|
+$plot_buttons = TkFrame.new(base_frame) {|frame|
TkButton.new(frame) {
#text '了解'
text '閉じる'
@@ -49,7 +51,7 @@ $plot_buttons.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
end
# canvas 設定
-$plot_canvas = TkCanvas.new($plot_demo,'relief'=>'raised','width'=>450,'height'=>300)
+$plot_canvas = TkCanvas.new(base_frame,'relief'=>'raised','width'=>450,'height'=>300)
$plot_canvas.pack('side'=>'top', 'fill'=>'x')
# plot 生成