[pygtk] Viewport set-scroll-adjustments signal

Scott Horowitz stonecrest at gmail.com
Wed Mar 29 04:14:02 WST 2006


On 3/28/06, John Finlay <finlay at moeraki.com> wrote:
> The wording of the docs is a bit confusing. The "set-scroll-adjustments"
> signal is emitted when one or both Adjustments of the Viewport are set
> or replaced for example by using the Viewport.set_hadjustment() method.
> To track the change of the Scrollbars you need to connect to the
> "value-changed" signal of the appropriate Adjustment.
>
> John
>

Ahh, thank you! Indeed I did find the docs to be confusing. Thanks for
your help (and jpe from #pygtk), I have now gotten it working. Just to
archive the answer for others who may want to do this, you can
therefore do something like:

self.scrolledwindow.get_hadjustment().connect("value-changed",
self.adjustments_changed)

Scott


More information about the pygtk mailing list