Hi Hendrik,

On 8 July 2011 09:17, Hendrik Tews <[email protected]> wrote:
> what is the preferred way to reposition a GtkDrawingArea inside a
> GtkScrollbar just after the GtkDrawingArea has been enlarged?

I agree, this can be tricky with an asynchronous toolkit.

In my opinion, the best solution is to do the scrolling from the
expose event. When you create the new object, set a flag on it called
scroll_on_expose or something like that. Then as you loop over your
objects in the expose handler, queue scroll requests if you see the
flag set (and then clear it, obviously).

I do this as a model-view thing in my app. My models emit "scrollto"
events when they are created, their associated views pick these
signals up and adjust their containing viewports to make sure that
they are visible.

John
_______________________________________________
gtk-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtk-list

Reply via email to