Re: Scrollbars and multiple viewports.
- From: Paul Davis <pbd Op Net>
- To: David Pettersson <dapet mai liu se>
- Cc: gtk-list gnome org
- Subject: Re: Scrollbars and multiple viewports.
- Date: Tue, 23 Oct 2001 15:55:12 -0400
>I tried to follow your recipe but I get a runtime error from gdk:
hopefully, you've been reading my other messages to this list about
Scrolled Windows, Viewports and Scrollbars.
>As soon as two or more scrolled windows use the same adjustment, I get
>this error one time per window using the adjustment.
>This is what i do, I hope all relevant code is in. Basically:
>create a gtk_table and two scrolled windows and something to pack into
>them. One of the scrolled windows with the adjustments of the other.
Turns out to be a very bad idea that causes an endless feedback loop
when the Table's "configure" event is called. This seems to be because
the adjustments are constantly modified during the "configure"
process, and each scrolled window keeps responding to changes that the
*other* one made.
Moreover, unless the contents of the scrolled windows are a Layout or
a Fixed widget, the sizes will not be correct when you specify
(NEVER,NEVER) for the scrollbar policy. I've written quite a bit about
that here over the last 2-3 weeks.
What I'm doing now is to pack my widgets into a Layout, then add that
to the scrolled window. I tell them both to hide their scrollbars, and
add an additional scrollbar. Then I catch the value_changed signal
from this scrollbar's adjustment, and the handler sets the adjustments
for both the scrolled windows. its working wonderfully now, with the
slight problem that you have to manually size the Layout.
--p
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]