Re: Auto Scrolling
- From: Carlo <carlo-ag libero it>
- To: gtk-app-devel-list gnome org
- Subject: Re: Auto Scrolling
- Date: Fri, 29 Oct 2004 08:51:46 +0200
Leo Przybylski ha scritto lo scorso 28/10/2004 22.46:
Hello,
I'm trying to tail a file using a GtkTextView. Is that the right way I
should be going about it? Does anyone have examples or anything for an
autoscrolliing GtkTextView ???
Leo
You have to place a textiter at the end of your text buffer:
gtk_text_buffer_get_end_iter (buffer, & end_iter);
move an already generated mark to such iter (you can generate it once
for all, e.g. in a realize_event, and use it referencing by name until
your textview lives; in this case I gave it the name "scroll"):
gtk_text_buffer_move_mark_by_name (buffer, "scroll", & end_iter);
and finally scroll (tvShell here is the textview to which buffer is
associated):
gtk_text_view_scroll_mark_onscreen (
GTK_TEXT_VIEW (tvShell),
gtk_text_buffer_get_mark (
buffer,
"scroll"));
HTH
Carlo
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]