I'm not sure if there's a canonical answer to this. The way I've done
this is:
view = gtk.<whatever...>
scroller = gtk.ScrolledWindow()
scroller.add(view)
vadj = scroller.get_vadjustment()
vadj.connect('changed', lambda a, s=scroller: rescroll(a,s))
def rescroll(adj, scroll):
adj.set_value(adj.upper-adj.page_size)
scroll.set_vadjustment(adj)
That will always keep the scroller at the bottom; I also usually add a
check to see if the last position was at the bottom, so it only
autoscrolls if it was already all the way down - that way the user can
scroll back up and not be interrupted.
Abe
On Sat, 15 Feb 2003, Martijn Brouwer wrote:
> Hi, I have added a scrolled window to my application. I want it to
> display always the lowest part of the widget inside it (a gtk.textview).
> How can I achieve this?
>
> Bye,
>
> Martijn
>
> _______________________________________________
> pygtk mailing list [EMAIL PROTECTED]
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
>
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/