Re: GtkTextView scroll preservation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



So perhaps the insert-text signal should be emitted after the heights have been measured? Or there should be a an additional signal emitted after that has happened.

Meanwhile I have found that I cannot use the TextViewer widget because of the very slow repainting and flickering that takes place as a result of ...set_text() and the callbacks needed to keep the vertical adjustment in place.

I'm considering writing a ScrolledLabel widget instead that effectively would work as a viewport to a list of PangoLayoutLines. But I think it is a shame that the TextViewer cannot be used for this.

Regards,
Dov

2010/1/16 David Nečas <yeti@xxxxxxxxxxxxxxx>
On Sat, Jan 16, 2010 at 07:40:15PM +0200, Dov Grobgeld wrote:
>    - There should be a more direct way of requesting that a certain line be
>    displayed in the textview after insertion other than playing recursive
>    tricks with the adjustment callbacks!

There is, you can create an iter corresponding to the specified line and
scroll to it.  However, in your insert_text() callback it is too early
to do this (the text has not been measured yet probably).

Yeti


_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux