summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMatthias Clasen <matthiasc@src.gnome.org>2006-08-26 01:17:17 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2006-08-26 01:17:17 +0000
commit72e4e08602593c27d1bd3f233a43fdb757062bf1 (patch)
treef9d560f7ccbe6c0f62f6b214bf6f48b7f5b36f2a /docs
parent4ab827e20a047eb4b6ef033f9d8bddb5a403e72d (diff)
downloadgtk+-72e4e08602593c27d1bd3f233a43fdb757062bf1.tar.gz
demonstrate automatic scrolling
Diffstat (limited to 'docs')
-rw-r--r--docs/reference/ChangeLog5
-rw-r--r--docs/reference/gtk/question_index.sgml19
2 files changed, 16 insertions, 8 deletions
diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog
index 045b49170e..0a9adf6075 100644
--- a/docs/reference/ChangeLog
+++ b/docs/reference/ChangeLog
@@ -1,3 +1,8 @@
+2006-08-25 Matthias Clasen <mclasen@redhat.com>
+
+ * gtk/question_index.sgml: Rewrite the answer for
+ automatic scrolling.
+
2006-08-17 Matthias Clasen <mclasen@redhat.com>
* === Released 2.10.2 ===
diff --git a/docs/reference/gtk/question_index.sgml b/docs/reference/gtk/question_index.sgml
index 441def5a5a..6c1f32fff3 100644
--- a/docs/reference/gtk/question_index.sgml
+++ b/docs/reference/gtk/question_index.sgml
@@ -757,18 +757,21 @@ How do I make a text view scroll to the end of the buffer automatically ?
<answer>
<para>
-The "insert" <link linkend="GtkTextMark">mark</link> marks the insertion point
-where gtk_text_buffer_insert() inserts new text into the buffer. The text is inserted
-<emphasis>before</emphasis> the "insert" mark, so that it generally stays
-at the end of the buffer. If it gets explicitly moved to some other position,
-e.g. when the user selects some text, use gtk_text_buffer_move_mark() to set it to
-the desired location before inserting more text. The "insert" mark of a buffer can be
-obtained with gtk_text_buffer_get_insert().
+A good way to keep a text buffer scrolled to the end is to place a
+<link linkend="GtkTextMark">mark</link> at the end of the buffer, and
+give it right gravity. The gravity has the effect that text inserted
+at the mark gets inserted <emphasis>before</emphasis>, keeping the mark
+at the end.
</para>
<para>
To ensure that the end of the buffer remains visible, use
-gtk_text_view_scroll_to_mark() to scroll to the "insert" mark after inserting new text.
+gtk_text_view_scroll_to_mark() to scroll to the mark after
+inserting new text.
+</para>
+
+<para>
+The gtk-demo application contains an example of this technique.
</para>
</answer>
</qandaentry>