[pygtk] textview - all text viewable?
towb at celvina.de
towb at celvina.de
Sun May 27 04:46:48 WST 2012
On 26.05.2012, at 18:08, Ted Toth wrote:
> For a textview in a scrolledwindow is there a way to know that all of the text can be seen without scrolling?
s = buffer.get_start_iter()
e = buffer.get_end_iter()
r = view.get_visible_rect()
y, _ = view.get_line_yrange(s)
start_in_sight = y < r.y
y, _ = view.get_line_yrange(e)
end_in_sight = y < (r.y + r.height)
(untested)
More information about the pygtk
mailing list