[pygtk] How can I suppress redraw of a gtk.ScrolledWindow and children until I'm done changing stuff?

Joel Hedlund yohell at ifm.liu.se
Mon Oct 27 01:54:35 WST 2008


Hi all!

I've got a large widget (W) in an alignment in a viewport in a small 
scrolledwindow (S). S overrides the do_scroll_event method, so that 
ctrl-scroll zooms by doing W.set_size_request(). Since what's under the 
mouse pointer should stay put and not be scrolled off the screen as W 
resizes, the values on the adjustments on S need to be changed to 
compensate.

Now, my problem. GTK redraws after W.set_size_request() and after 
S.props.vadjustment.set_value(), making zooming a very flickery and 
migraine inducing experience that I don't want to subject my users to.

So, how can I suppress redraws on a gtk.ScrolledWindow and its children 
until I'm done changing stuff?

Thanks for your time,
Joel Hedlund



More information about the pygtk mailing list