[pygtk] Coords in a TextView
Fernando San Martín Woerner
snmartin at galilea.cl
Wed Mar 30 03:59:05 WST 2005
i have the answer:
win = text.get_window(gtk.TEXT_WINDOW_WIDGET)
tx, ty = win.get_origin()
rect = text.get_iter_location(iter)
wx, wy = text.buffer_to_window_coords(gtk.TEXT_WINDOW_WIDGET, rect.x,
rect.y + rect.height)
w = gtk.Window()
w.move(wx + tx, wy + ty)
just i've read the code from monodevelop...
regards.
El mar, 29-03-2005 a las 14:39 -0400, Fernando San Martín Woerner
escribió:
> Hi all!
>
> i want to display a new window in the exact coordinates of cursor
> pointer in a textview, is there some method to know x, y coordinates?
>
> i want to simulate a popup window for code autcompletion in a
> gtk.TextView / SourceView...
>
> thanks in advance.
>
--
Fernando San Martín Woerner
Jefe de Informática
Galilea S.A.
More information about the pygtk
mailing list