I have a wx.Dialog box. In that dialog, I have widgetA. WidgetA contains widgetB. WidgetB can change its size at runtime in response to user selections.
When widgetB gets larger, then widgetA, and the dialog box both need to adjust their layout/size to accomodate the larger widget. This page talks about doing this, and describes a few methods:
https://wiki.wxpython.org/WhenAndHowToCallLayout
The hierarchy is such that all panels and the dialog frame will need resizing, so I'm tempted to use one of the ideas from the page:
When widgetB gets larger, then widgetA, and the dialog box both need to adjust their layout/size to accomodate the larger widget. This page talks about doing this, and describes a few methods:
https://wiki.wxpython.org/WhenAndHowToCallLayout
The hierarchy is such that all panels and the dialog frame will need resizing, so I'm tempted to use one of the ideas from the page:
widget = self.widgetThatWasChanged while widget.GetParent(): widget = widget.GetParent() widget.Layout() widget.Fit() if widget.IsTopLevel(): breakIs there any real downside to this since any fancy code would just be calling Layout() on all the parents anyway?