sizing a panel under a wx.FoldPanelBar

Dear all,

I’ve been fighting this for some time now and I don’t think I’ll be able so solve it without help.

I attached a stripped-down example where this arrangement can be started
as a panel in a standalone Frame or as a pane in an aui window.

I have a notebook where all tabs have the same general arrangement: a foldbarpanel at the top and another panel below that.

The foldbarpanel is the same on all tabs (instances of the same class) and are synced regarding the state of the panels. This works OK.

The panel below (I call it “maincontent”) is different on all pages.

My problem is: sizing the panel with the maincontent and sizing the frame holding the panels.

Depending on the state and expanded size of the foldbarpanel and the height of the frame this panel is put in, the maincontent panel may be fully visible, partly visible or not visible.

Currently the holding frame does not resize, neither does a scrollbar show if e.g. the maincontent panel is only partly visible. However, if the window holding the panels is resized (e.g. user resizes), stuff seem to work OK.

I’d like to be able to define a minimum height for the holding panel so it resizes if e.g. panels are expanded to make them visible (no resizing on collapse, though), as well as to automatically have the maincontent scroll if necessary.

I hope to get some help. Thank you very much in advance!

Gabor

centerpanel_stripped.py (7 KB)