From: Kero van Gelder Date: 2001-11-10T21:26:13+09:00 Subject: [ruby-talk:24826] Re: Ruby-Tk; feature/bug/misunderstanding? mouse-location during when a key is pressed in the presence of TkMenubutton > > You get the (x, y) of the mouse w.r.t. the root window, since that is > > what you bind to. You can bind to the canvas to get (x, y) w.r.t. to > > the canvas. You may want to add canvas.focus() to your code. > > > > I never found a way to determine the size of a widget (i.e. you can > > set it with width(w), but bot obtain it). > > There's no winfo equivalent in Ruby/Tk ?? > in tcl you'd use winfo to get the requested and/or real size of > a widget ... Ah, that's where I should look! Thanks. From OO perspective, that's not obvious, but heck, it can be worse, I guess :) NB: Ruby/Tk seems to have all Tk features, so let's assume it is implemented. PS: This might solve my double scrollbar problem for a canvas... +--- Kero ------------------------------ kero@chello.nl ---+ | Don't split your mentality without thinking twice | | Proud like a God -- Guano Apes | +--- M38c ------- http://members.chello.nl/~k.vangelder ---+