Re: scrolling logs in GtkTextView to the end (Re: scrolling windo ws)



On Thu, Mar 06, 2003 at 05:11:39PM -0000, martyn 2 russell bt com wrote: 
I meant in relation to the statement (which TP Muller commented on):

"Note that line heights are computed in an idle handler; so this function
may not have the desired effect if it's called before the height
computations."

I too have experienced the problem where by adding text to a text buffer and
then scrolling to the end iter (by using gtk_text_buffer_get_bounds())
doesn't scroll fully and half the line is missed.

Surely scrolling to the iter should do exactly that without needing a hack
(as provided by TP Muller) which scrolls on an idle timeout?

You don't need that hack, you just need to use scroll_to_mark.

Scroll to iter *does* do exactly that. However, then the size of the
buffer changes and you need to re-scroll. So what you have to do is
save a mark which is scrolled to later.

If GtkTextView did the line heights synchronously it would be
slow. Very very slow.

Havoc



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