PyCollapsiblePane causes AUI-managed frame to collapse to nothing

Change this style=... to agwStyle=... A while back Andrea changed the AGW classes to take the AGW specific styles in a new parameter since he needed more style bits for some widgets than were available. You'll still need use style=... for the basic window styles.

···

On 12/13/11 8:49 PM, luvspython wrote:

I have a panel that includes a PyCollapsiblePane. It was working fine
in a regular frame and notebook.

I converted to using an AUI-managed frame and an AUI notebook, and
when the PyCollapsible pane is toggled, the frame collapses (shrinks?)
to essentially nothing. Below is a small example. Am I doing
something wrong? If not, is there some way to work around this?

Thank you ... Bob (code follows)

import wx
import wx.lib.agw.aui as aui
import wx.lib.agw.pycollapsiblepane as PCP

class CollapsiblePanePanel(wx.Panel):
     def __init__(self, parent):
  wx.Panel.__init__(self, parent, wx.ID_ANY)
  szrSelf = wx.BoxSizer(wx.VERTICAL)
  self.SetSizer(szrSelf)

         cpAlarm = PCP.PyCollapsiblePane(self, label='COLLAPSABILE
PANE', style=wx.CP_DEFAULT_STYLE|wx.CP_NO_TLW_RESIZE)

--
Robin Dunn
Software Craftsman

You'll have to dig in to the AUI code to be sure, but I expect that the CP code that tries to resize the top-level parent simply doesn't play nice with how the sizers are used in an AUI managed frame.

···

On 12/14/11 2:36 PM, luvspython wrote:

Robin,
     In addition to my thanks, could you explain that as well? Why
did the absence of those flags to agwStyle cause that behavior? I.e.,
the AUI-managed frame collapsed to essentially zero, yet the notebook
tabs should still have taken up space and have been displayed, and the
same applies to the CollapsiblePane control that's clicked to toggle
it. So why would everything size down to a point of not showing
those?

--
Robin Dunn
Software Craftsman