[pygtk] synchronizing HPaned widgets
stephen.langer at nist.gov
Fri Feb 6 07:39:17 WST 2009
On Feb 5, 2009, at 5:24 PM, John Finlay wrote:
> Yes but you have to set the default size of the window as large or
> larger than the required size of the largest pane. Your code doesn't
> set the window size so it starts up with the minimum required size
> to fit the paned widgets. Since the two separators can't line up
> because the panes are different sizes and because the panes can't
> shrink the set_position() calls fail and apparently trigger a resize
> calculation which trys to set the position and so on. Your choices
> are allow something to shrink or set a window size that will allow
> the separators to line up initially.
Ok, I see now. The minimum size for each pane is smaller than the
minimum size that will hold the aligned panes, but the window asks the
panes for their minimum sizes before they've tried to align themselves.
> Also you can add a detail to the "notify" signal connection that
> only signals when the position is changed - use "notify::position"
> and you can remove the gparamspec.name check in paneMoved().
Thanks for pointing that out.
-- EMail: stephen.langer at nist.gov Phone: (301)
-- WWW: http://math.nist.gov/mcsd/Staff/SLanger/ Fax: (301)
-- Mail: NIST; 100 Bureau Drive -- Stop 8910; Gaithersburg, Md
-- "I don't think this will work. That's why it's
-- Naomi Langer (age 6), 17 Feb
More information about the pygtk