Hi,

Yang Zhang wrote:
> Hi, I'm trying to create a pop-up window positioned immediately below an
> Entry.  How do I figure out the coordinates to pass into
> Window.move(x,y)?  I couldn't find how to extract this information from
> an Entry.  Thanks in advance for any hints.
>   

The best way I found was the gtk.Widget.get_allocation() method. 
Although I'm not sure if this includes window decorations - the window I 
use it with is also a pop-up window, so does not have any decorations.

It took quite some hacking to get the positioning and sizing to work 
just right, so in the interest of (hopefully) saving you a few hours, 
have a look at the TMWindow.update_geometry() method in 
https://translate.svn.sourceforge.net/svnroot/translate/src/trunk/virtaal/virtaal/plugins/tm/tmwidgets.py.

HTH

Walter

-- 
Walter Leibbrandt                  http://translate.org.za/blogs/walter
Software Developer                                  +27 12 460 1095 (w)
Translate.org.za

Recent blogs:
* Virtaal's MVCisation
http://www.translate.org.za/blogs/walter/en/content/virtaals-mvcisation
* Things that changed the way I code
* Switching from Subversion to git


_______________________________________________
pygtk mailing list   pygtk@daa.com.au
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to