I have the following structure in a Windows Form:
Form (AutoResize = true, AutoSizeMode = GrowAndShrink)
FlowLayout (AutoResize = true, AutoSizeMode = GrowAndShrink)
GroupBox
GroupBox
GroupBox
StatusStrip
My expectation is that changing the visibility of the GroupBoxes should cause the Window to snap to a new size to reclaim empty space, or accommodate new controls. However, this doesn't happen automatically. If I minimise to the tray and then restore the form (i.e. toggle Visible, ShowInTaskbar, WindowState = Normal/Minimized), then when it reappears, it will have updated correctly. Another thing that triggers it is an update to content in a StatusStrip at the bottom of the page (showing a label, changing a progress bar etc). I've tried various voodoo-inspired combinations of Invalidate/Update/OnResize etc, but I feel I'm missing something a bit more fundamental and hope somebody can see the obvious flaw in what I'm describing.
All my updates to widgets on the form are inside InvokeRequired/Invoke, if that's relevant.