From: matz@... (Yukihiro Matsumoto) Date: 1997-01-20T19:35:05+09:00 Subject: [ruby-list:1781] Re: rectangle of canvas widget まつもと ゆきひろです In message "[ruby-list:1771] rectangle of canvas widget" on 97/01/20, Noritugu Nakamura writes: |ところで、 |ruby/Tk で Scale, Image というのは使えるのでしょうか? 使えるようです.プログラムの本質的な部分だけあげると以下のよ うになります.ただし image には例によってバグがありましたの で,末尾に付加したパッチを当ててください. | |scale .s -from 0 -to 100 -showvalue yes -tickinterval 10 -length 300 |pack .s TkScale.new { from 0 to 100 showvalue 'yes' tickinterval 10 length 300 pack } | |image create photo image1a -file [file join $tk_library demos images earth.gif] |label .l1 -image image1a -bd 1 -relief sunken |pack .l1 -side top -padx .5m -pady .5m im = TkPhotoImage.new { file '/usr/local/lib/tk4.0/demos/images/earth.gif' } TkLabel.new { image im border 1 relief 'sunken' pack 'side' => 'top', 'padx' => '.5m', 'pady' => '.5m' } -- patch --- lib/tkcanvas.rb~ Tue Jul 30 09:29:10 1996 +++ lib/tkcanvas.rb Mon Jan 20 14:55:03 1997 @@ -272,7 +277,7 @@ def initialize(keys=nil) @path = $tk_image_id $tk_image_id = $tk_image_id.succ - tk_call 'image', @type, @path, *hash_kv(keys) + tk_call 'image', 'create', @type, @path, *hash_kv(keys) end def height @@ -302,7 +307,7 @@ class TkPhotoImage