[pygtk] Re: custom popup dialog
Michael Baranov
michael.baranov at gmail.com
Sat Oct 13 20:36:48 WST 2007
Sorry for the post... It looks like I was wrong: entry.get_allocation() =
returns *actual* size and position.
Cheers!
> Hello!
>
> I'm implementing a custom popup window for a gtk.Entry. Actually it's =
> a custom completion popup. but does not really matter. The real =
> question is:
>
> *for a given gtk.Entry (parented, realized) get location of the =
> left-bottom corner of the entry in screen coordinates* (in order to =
> position the popup window).
>
>
> Part of the problem I solved myself:
> window =3D entry.get_parent_window()
> origin =3D window.get_origin()
> origin returns left-top corner of window's client area in screen =
> coordinates. It's OK.
>
> But I'm not able to get *actual* entry position and size in window =
> coordinates. entry.get_allocation() returns allocation which not =
> always corresponds to *actual* on-screen size and position, but rather =
> reflects he space devoted to the widget. For example putting gtk.Entry =
> into gtk.VBox gives the above results.
>
> Help is much appreciated! Thanks!
> -- =
> Michael Baranov
> =
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.daa.com.au/pipermail/pygtk/attachments/20071013/9bb37ffc/at=
tachment.htm
More information about the pygtk
mailing list