From: Hidetoshi NAGAI Date: 2004-12-05T09:35:23+09:00 Subject: Re: get TkCanvas from an item? Hi, From: "R. Mark Volkmann" Subject: get TkCanvas from an item? Date: Sun, 5 Dec 2004 07:13:30 +0900 Message-ID: <04ed01c4da4e$7c330840$0200a8c0@MarkDesktop> > 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? If you want that, please add the following to your script. ---------------------------------------------- class TkcItem < TkObject def canvas; @parent; end end ---------------------------------------------- or ---------------------------------------------- class TkcItem < TkObject def parent; @parent; end end ---------------------------------------------- -- Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)