Re: GtkTextView scroll preservation
- From: Dov Grobgeld <dov grobgeld gmail com>
- To: John Stowers <john stowers lists gmail com>
- Cc: Gnome List <gtk-list gnome org>
- Subject: Re: GtkTextView scroll preservation
- Date: Sat, 16 Jan 2010 19:40:15 +0200
Thanks. With your example I somehow managed to get solve it, though I feel the solution is quite ugly:
- 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!
- Even though I'm doing one atomic insertion of the entire contents of the text buffer through gtk_text_buffer_set_text() there are several callbacks to to the adjustments taking place, each one causing a redraw of the scrollbars and probably of the text view as well.
Regards,
Dov
On Fri, Jan 15, 2010 at 13:34, John Stowers
<john stowers lists gmail com> wrote:
On Fri, 2010-01-15 at 10:30 +0200, Dov Grobgeld wrote:
> I'm using a GtkTextView to display various texts that are changing but
> have the same length. The problem is that I would like to preserve
> the scroll position when changing the text, but so far I haven't
> managed to do that. Here is a test program:
Here is an example I wrote/borrowed (python)
http://github.com/nzjrs/wasp/blob/master/sw/groundstation/gs/ui/log.py
John
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]