From: ichimunki Date: 2002-01-10T10:24:27+09:00 Subject: Re: Tk Popup Menu in a TkText widget --=.Mho.8yTK'_+etH Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit (on Thu, 10 Jan 2002 05:01:50 +0900) kero@chmeee.m38c.nl (Kero van Gelder) wrote: > Have a look at TkWinfo. > TkWinfo.x(ed) or TkWinfo.root_x(ed) may produce the numbers you want. Thanks for the tip. I must have overlooked TkWinfo somehow. Also, turns out that I can just do: ed_menu = MakeMenu.editor_bind_menu( ed ) ed.bind('ButtonPress-3', proc{ |x,y| ed_menu.popup( x, y ) }, "%X %Y" ) I see that if I had read the Tk binding section of "Programming Ruby" a little more closely I would have seen that the "%var" parameter to Tk#bind is an event field string, which corresponds to a bunch of Tk event fields (I'm assuming all the fields listed here are available: http://tcl.activestate.com/man/tcl8.4/TkCmd/event.htm). -- ______Michael_C_Libby__{_x_(at)_ichimunki_(dot)_com_}______ | "even monkeys fall from trees" : "saru mo ki kara ochiru" | | public key at http://www.ichimunki.com/public.key | |_Fingerprint: D946FE20 79EE2109 161BFAFB E02956F4 A330AA73_| --=.Mho.8yTK'_+etH Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE8POzJ4ClW9KMwqnMRAj63AJ9wBqUHX7TA2yR8DWqjw503cKhU0wCgpB2Z mO8RRgWMdfnH2e9veK41vmk= =CMWi -----END PGP SIGNATURE----- --=.Mho.8yTK'_+etH--