I share Ted's concern. I think a 'well-behaved child widget' does not
know anything about its parent (or grandparent). Its added to a
container widget and expands/shrinks (depending on its resize policy) to
use the space that the container widget gives it. So the container
widget dictates the size of the child widget, not the other way round.
If you use the GUI to resize the canvas, you resize the gtk.Window and
the gtk.Window resizes the canvas. It seems reasonable to use the same
process to resize from a script - resize the gtk.Window and let the
Gtk.Window resize the canvas.
Or to put it another way - let the FigureManager manage the Figure!
I've updated backend_gtk.py to use this method, you can test it with:
$ ipython -gthread
In : import pylab as p
In : fig = p.figure()
In : fm = p.get_current_fig_manager()
In : fm.set_canvas_size(500, 600)
Send instant messages to your online friends http://au.messenger.yahoo.com
On Fri, 2005-10-07 at 20:04 -0700, email@example.com wrote:
If you can sketch a cleaner implementation that makes more
me know. Since only GTK has an implementation currently and
broken, and no mpl code is currently using the resize
field is wide open.