Hi, 

From: MENON Jean-Francois <Jean-Francois.MENON / meteo.fr>
Subject: tkCanvas
Date: Tue, 29 Jan 2002 12:41:00 +0900
Message-ID: <3C5619C6.5E761053 / meteo.fr>
> does someone knows why I can't get the size of the items displayed on a
> TkCanvas ?
> (either configure or cget return 0). actually I know only 'bbox' method,
> but it does not work for an image !
> any idea ?

Am I misunderstanding your question?
-------------------------------------------------
$ irb
irb(main):001:0> require 'tk'
true
irb(main):002:0> c = TkCanvas.new.pack
#<TkCanvas:0x40231d88 @path=".w0000">
irb(main):003:0> l = TkcLine.new(c, 100, 100, 200, 200)
#<TkcLine:0x404896e0 @id=1, @path=".w0000", @parent=#<TkCanvas:0x40231d88 @path=".w0000">, @c=#<TkCanvas:0x40231d88 @path=".w0000">>
irb(main):004:0> img = TkPhotoImage.new('file'=>'relief.gif')
#<TkPhotoImage:0x40486738 @path="i00000", @type="photo">
irb(main):005:0> i = TkcImage.new(c, 50, 50, 'image'=>img, 'anchor'=>'nw')
#<TkcImage:0x40481f1c @id=2, @path=".w0000", @parent=#<TkCanvas:0x40231d88 @path=".w0000">, @c=#<TkCanvas:0x40231d88 @path=".w0000">>
irb(main):006:0> l.bbox
[98, 98, 202, 202]
irb(main):007:0> i.bbox
[50, 50, 126, 323]
irb(main):008:0> 
-------------------------------------------------
-- 
                                  Hidetoshi NAGAI (nagai / ai.kyutech.ac.jp)