I have a mini-Frame whose child controls change based on a user selection. It took awhile to get the resizing and layout working as controls are added and removed from the panel. This is the final code that works. The event handler calls selectedXXX, where XXX is one of the options. Each set of controls that are shown or hiddern reside in their own sizer, although if it were just one control you can show or hide it directly.
<pre> def selectedXXX(self): self.mainSizer.Show(self.rXXXSizer) self.mainSizer.Hide(self.ZZZSizer) #hide other sizers/windows as needed . . . self.updateAfterControlsChange() <br> def updateAfterControlsChange(self): self.Fit() self.GetParent().Fit() self.GetParent().SendSizeEvent() </pre>