Re: scrolling logs in GtkTextView to the end (Re: scrolling windows)
- From: ibrar ahmed <sayaji99 yahoo com>
- To: jcupitt gmail com
- Cc: gtk-list gnome org
- Subject: Re: scrolling logs in GtkTextView to the end (Re: scrolling windows)
- Date: Fri, 4 May 2007 05:25:02 -0700 (PDT)
Thank you!
I done it the same way which you told, now it working fine here also.
Again thanx.
Regards,
Ibrar Ahmed
jcupitt gmail com wrote:
Hi,
On 5/4/07, ibrar ahmed wrote:
> http://mail.gnome.org/archives/gtk-app-devel-list/2003-March/msg00064.html
>
> Please see this reference where this problem already handled, but there is
> issue regarding work on FTP server.
I use the following code to append to a text buffer and scroll to the
bottom. It seems to work fine for me and doesn't need an idle handler:
GtkTextView *text_view = GTK_TEXT_VIEW( trace->view );
GtkTextBuffer *text_buffer = gtk_text_view_get_buffer(
text_view );
GtkTextMark *mark = gtk_text_buffer_get_insert( text_buffer );
GtkTextIter iter;
gtk_text_buffer_get_end_iter( text_buffer, &iter );
gtk_text_buffer_move_mark( text_buffer, mark, &iter );
gtk_text_buffer_insert_at_cursor( text_buffer, buf, -1 );
gtk_text_view_scroll_to_mark( text_view, mark, 0.0,
TRUE, 0.5, 1 );
John
Ahhh...imagining that irresistible "new car" smell?
Check out
new cars at Yahoo! Autos.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]