GtkTextView and scrolling



  I'm struggling to have a simple GtkTextView scroll all the way to
bottom. I have a function that inserts some text into a text buffer, at
the end, and then scrolls the view all the way down. Just like a terminal
emulation program.
  I have tried 3 approaches:
    1- Manually setting the value of the containing scrolled window:
	gtk_adjustment_set_value(adj, adj->upper - adj->page_size);
       This used to work with GtkText in gtk-1.2
    2- gtk_text_view_scroll_to_iter()
    3- gtk_text_view_scroll_to_mark()

  All three methods succeed when text being inserted is a single line, but
when the inserted text has more than one line, only the first one is
displayed. The rest of the lines are below, outside the view.


-- 
Gustavo Joćo Alves Marques Carneiro <ee96090 fe up pt>
 __                          _
/__      _ _|_  _.     _    /   _. ._ ._   _  o ._ _
\_| |_| _>  |_ (_| \/ (_)   \_ (_| |  | | (/_ | | (_)





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