Re: GtkTextView and scrolling



hmm this looks like bug #50974 I reported before:

Example:

Set the cursor at the bottom visible line and hit "Return" key to see what
I mean.


Greets

M.H.

For example if the cursor is at the bottom of the showed 

On 2001.04.28 21:00 Havoc Pennington wrote:
> 
> Gustavo Joćo Alves Marques Carneiro <ee96090 fe up pt> writes:
> >   I'm struggling to have a simple GtkTextView scroll all the way to
> > bottom. I have a function that inserts some text into a text buffer, at
> > the end, and then scrolls the view all the way down. Just like a
> terminal
> > emulation program.
> >   I have tried 3 approaches:
> >     1- Manually setting the value of the containing scrolled window:
> > 	gtk_adjustment_set_value(adj, adj->upper - adj->page_size);
> >        This used to work with GtkText in gtk-1.2
> >     2- gtk_text_view_scroll_to_iter()
> >     3- gtk_text_view_scroll_to_mark()
> > 
> >   All three methods succeed when text being inserted is a single line,
> but
> > when the inserted text has more than one line, only the first one is
> > displayed. The rest of the lines are below, outside the view.
> > 
> 
> To scroll to the end it should work to just:
>  gtk_text_buffer_get_end_iter (buffer, &iter);
>  gtk_text_view_scroll_to_iter (textview, &iter, 0, TRUE, 0.0, 1.0);
> 
> If that doesn't work, toss us a bug report on bugzilla.gnome.org -
> maybe include the exact code you're using.
> 
> Havoc
> 
> _______________________________________________
> gtk-devel-list mailing list
> gtk-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-devel-list
> 




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