A Seg, 2003-12-01 �s 14:22, Felix Benner escreveu:
> Am Do, 2003-11-27 um 14.24 schrieb Christian Robottom Reis:
> > On Thu, Nov 27, 2003 at 01:38:29PM +0100, Felix Benner wrote:
> > > Hi, I'm using a TextView as a telnet terminal and want to scroll the
> > > view when new output arrives. I use the following code fragment
> >
> > Quick question: have you had a look at
> > http://www.async.com.br/faq/pygtk/index.py?req=show&file=faq14.010.htp
>
> I tried this, but it doesn't work. Neither
> self.output.scroll_to_iter(self.output.get_buffer().get_end_iter(), 0)
> nor
> self.output.scroll_to_mark(self.output.get_buffer().get_insert(), 0)
> actually scroll the window. Did I maybe set up something wrong? I just
> added the TextView to a ScrolledWindow. Do I need to connect some
> signals?
What version of Gtk+ are you using? I remember filing a bug report
about this a long time ago, so I believe this did not work in gtk+ 2.0.
In any case, you have to use scroll_to_mark(), since scroll_to_iter()
doesn't work immediately after insertion, only later the text view
widget has done some work in an idle handler.
--
Gustavo Jo�o Alves Marques Carneiro
<[EMAIL PROTECTED]> <[EMAIL PROTECTED]>
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/