[pygtk] Viewport set-scroll-adjustments signal

Scott Horowitz stonecrest at gmail.com
Mon Mar 27 09:58:40 WST 2006


I'm at a loss as to why I'm unable to use the Viewport's
set-scroll-adjustments signal. Essentially, I'm trying to cancel the
auto-adjustment of the Viewport and manually set the vertical and
horizontal scrollbars myself. I have something along the lines of:

self.scrolledwindow = gtk.ScrolledWindow()
self.viewport = gtk.Viewport()
self.scrolledwindow.add(self.viewport)
self.viewport.set_events(gtk.gdk.ALL_EVENTS_MASK)
self.viewport.connect("set-scroll-adjustments", self.adjustments_updated)

def adjustments_updated(self, widget, hadjustment, vadjustment):
	print "test"


When I do things to cause the scrollbars to re-adjust, 'test' is never
printed. Am I missing something obvious here?

Thanks,
Scott


More information about the pygtk mailing list