Re: How to make scroll bars follow text




 David,

 I don;t klnow if you got an answer for this yet, but I use these func to get
it to work.
 Their docs are : 
http://developer.gnome.org/doc/API/2.0/gtk/gtktextview.html



void        gtk_text_view_scroll_to_mark    (GtkTextView *text_view,
                                             GtkTextMark *mark,
                                             gdouble within_margin,
                                             gboolean use_align,
                                             gdouble xalign,
              
GtkTextMark* gtk_text_buffer_create_mark    (GtkTextBuffer *buffer,
                                             const gchar *mark_name,
                                             const GtkTextIter *where,
                                             gboolean left_gravity);           
                 gdouble yalign);


Cheers,

Harring


--- David Shifflett <shifflett nps navy mil> wrote:
Hi,
I am using a scrolled window and want to know how to
automatically make the scrollbar (vertical only)
position itself such that last item inserted into
the text field (within the scrolled window) is always
visible at the bottom of the scrolled window.

To put it another way:
The scrolled window shows 10 lines of text at a time.
once the text widget has more than 10 lines in it,
the bottom ten lines should be visible whenever new
text is added to the text widget.

Once the text widget is completely full (say 100 lines)
and I put the scrollbar all the way down manually,
the scrollbar will always show the last text inserted.

How do I make this behavior the default, even before
the text widget is full?

Any help, comments, examples, would be appreciated
Thanks,
David Shifflett

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com



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