[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

get TkCanvas from an item?

R. Mark Volkmann

12/4/2004 10:14:00 PM

If I have a Tk item like a TkcRectangle that has been created on a TkCanvas,
is there a way to ask the TkcRectangle for the TkCanvas that it is on? For
example, can I do something similar to this?

root = TkRoot.new {title 'Diagram'}
canvas = TkCanvas.new(root)
item = TkcRectangle.new(canvas, x, y, x + width, y + height)

the_canvas = item.canvas # not a real method

or

the_canvas = item.parent # not a real method




1 Answer

Hidetoshi NAGAI

12/5/2004 12:35:00 AM

0