From: Hidetoshi NAGAI Date: 2003-06-01T01:32:57+09:00 Subject: Re: Tk - list all options available for configure() Hi, From: "Phlip" Subject: Tk - list all options available for configure() Date: Sat, 31 May 2003 14:15:21 +0900 Message-ID: > canvas = TkCanvas.new(top) {width(400);height(300) } > p canvas.configure() > > ....if written in Python (boo! hiss!) Tkinter, would print out all the > configuration options. In this case, please use canvas.configinfo(). On Ruby/Tk, to query the configuration options, use one of the following methods. (1) widget[option] #==> canvas['width'] (2) widget.cget(option) #==> canvas.cget('width') (3) widget.option #==> canvas.width (4) widget.configinfo(option) #==> canvas.configinfo('width') (5) widget.configinfo #==> canvas.configinfo To modify the options, (1) widget[option] = value #==> canvas['width'] = 400 (2) widget.option(value) #==> canvas.width = 400 (3) widget.configure(option, value) #==> canvas.configure('width', 400) (4) widget.configure(Hash) #==> canvas.configure('width'=>400, 'height'=>300) -- Hidetoshi Nagai (nagai@ai.kyutech.ac.jp)