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

Re: Scrolling to end of scrolled window when first displayed



On Wed, 2008-05-14 at 18:42 +0100, jcupitt gmail com wrote:
> 2008/5/14 John M Collins <jmc xisl com>:
> > I have a GtkTextView displaying some text - actually a log file in a
> > Scrolled Window.
> >
> > I should like it to start off with the scroll at the bottom of the file
> > - i.e. showing the most recent entry in the log file.

> I found gtk_text_view_scroll_to_mark() worked even when the window was
> unmapped. Something like:
> 
>         gtk_text_buffer_get_end_iter( text_buffer, &iter );
>         gtk_text_buffer_move_mark( text_buffer, mark, &iter );
>         gtk_text_view_scroll_to_mark( text_view, mark,
>                 0.0, TRUE, 0.5, 1 );
> 
> John

Thanks that worked fine for me.

John Collins Xi Software Ltd www.xisl.com




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