I've been using a AUI managed frame with a few panes reasonably
successfully in spite of my newness to the process. I started from the
demo code example.
I've come to the point where I was trying to use a FoldPanelBar. The
behaviour I was expecting is to be able to click the bar, and expose
some additional settings.
I have that behaviour, however, the pane remains the same size, so I
have to manually resize the pane. Every attempt to resize the pane to
accommodate the grown size of the panel within seems to fail. Then, I
just played at trying to change the size of the pane on command at all
and I can't seem to make it change.
My approach is to trigger on the caption bar clicks with...
self.ExpPnl.Bind(fpb.EVT_CAPTIONBAR, self.OnDropPnl)
which runs this....
def OnDropPnl(self, evt):
print "Foldy Panel Click" + str(self.GetSizeTuple())
thisPane = myParent._mgr.GetPane("gamesetup") #an AUIPaneInfo
object is returned
wide,tall = self.GetSizeTuple()
if tall > 301:
self.SetSizeWH(880, 300)
thisPane.MinSize(wx.Size(850, 300)).BestSize(wx.Size(850,
300))
else:
self.SetSizeWH(880, 615)
thisPane.MinSize(wx.Size(850, 615)).BestSize(wx.Size(850,
615))
myParent._mgr.Update()
self.Layout()
evt.Skip()
The folding panel works fine, and I see the pane size report changing
as per print stmts:
Foldy Panel Click(880, 300)
Foldy Panel Click(880, 615)
Foldy Panel Click(880, 300)
but I never see the panel actually resize, making me wonder how one
does it?
Is it possible to change the size of an AUI pane after creation?
(I'm using Python 2.5.2 on Mac OS 10.4 and wxPython 2.8.8.1
Thanks for any guidance someone can throw my way. These lists seem
much quieter these days.
Ross.