 
       wx.lib.agw.pycollapsiblepane.PyCollapsiblePane¶
  wx.lib.agw.pycollapsiblepane.PyCollapsiblePane¶PyCollapsiblePane is a container with an embedded button-like control which
can be used by the user to collapse or expand the pane’s contents.
 Methods Summary¶
 Methods Summary¶| __init__ | Default class constructor. | 
| Collapse | Collapses or expands the pane window. | 
| DoGetBestSize | Gets the size which best suits the window: for a control, it would be the | 
| Expand | Same as Collapse(False). | 
| GetAGWWindowStyleFlag | Returns the PyCollapsiblePanewindow style. | 
| GetBorder | Returns the PyCollapsiblePaneborder in pixels (platform dependent). | 
| GetBtnLabel | Returns the button label. | 
| GetButton | Returns the button associated with PyCollapsiblePane. | 
| GetButtonFont | Returns the button font. | 
| GetExpanderDimensions | Returns the expander dimensions, a tuple of integers representing the | 
| GetLabel | Returns the button label. | 
| GetPane | Returns a reference to the pane window. Use the returned wx.Windowas | 
| HasAGWFlag | Returns whether a flag is present in the PyCollapsiblePanestyle. | 
| IsCollapsed | Returns Trueif the pane window is currently hidden. | 
| IsExpanded | Returns Trueif the pane window is currently shown. | 
| Layout | Layout the PyCollapsiblePane. | 
| OnButton | Handles the wx.EVT_BUTTONevent forPyCollapsiblePane. | 
| OnDrawGTKExpander | Overridable method to draw the GTK-style expander. | 
| OnDrawGTKStyle | Handles the wx.EVT_PAINTevent forPyCollapsiblePane. | 
| OnDrawGTKText | Overridable method to draw the PyCollapsiblePanetext in the expander. | 
| OnSize | Handles the wx.EVT_SIZEevent forPyCollapsiblePane. | 
| OnStateChange | Handles the status changes (collapsing/expanding). | 
| SetAGWWindowStyleFlag | Sets the PyCollapsiblePanewindow style flags. | 
| SetButton | Assign a new button to PyCollapsiblePane. | 
| SetButtonFont | Sets the button font. | 
| SetExpanderDimensions | Sets the expander width and height. | 
| SetLabel | Sets the button label. | 
 Class API¶
 Class API¶PyCollapsiblePane(wx.Panel)¶PyCollapsiblePane is a container with an embedded button-like control which
can be used by the user to collapse or expand the pane’s contents.
__init__(self, parent, id=wx.ID_ANY, label="", pos=wx.DefaultPosition, size=wx.DefaultSize, style=0, agwStyle=wx.CP_DEFAULT_STYLE, validator=wx.DefaultValidator, name="PyCollapsiblePane")¶Default class constructor.
| Parameters: | 
 | 
|---|
Collapse(self, collapse=True)¶Collapses or expands the pane window.
| Parameters: | collapse – Trueto collapse the pane window,Falseto expand it. | 
|---|
DoGetBestSize(self)¶Gets the size which best suits the window: for a control, it would be the minimal size which doesn’t truncate the control, for a panel - the same size as it would have after a call to Fit().
Note
Overridden from Panel.
GetAGWWindowStyleFlag(self)¶Returns the PyCollapsiblePane window style.
See also
SetAGWWindowStyleFlag for a list of possible window style flags.
GetBorder(self)¶Returns the PyCollapsiblePane border in pixels (platform dependent).
GetBtnLabel(self)¶Returns the button label.
GetButton(self)¶Returns the button associated with PyCollapsiblePane.
GetButtonFont(self)¶Returns the button font.
GetExpanderDimensions(self)¶Returns the expander dimensions, a tuple of integers representing the width and height of the expander, in pixels.
GetLabel(self)¶Returns the button label.
Note
Overridden from Panel.
GetPane(self)¶Returns a reference to the pane window. Use the returned wx.Window as
the parent of widgets to make them part of the collapsible area.
HasAGWFlag(self, flag)¶Returns whether a flag is present in the PyCollapsiblePane style.
| Parameters: | flag – one of the possible PyCollapsiblePanewindow styles. | 
|---|
See also
SetAGWWindowStyleFlag for a list of possible window style flags.
IsCollapsed(self)¶Returns True if the pane window is currently hidden.
IsExpanded(self)¶Returns True if the pane window is currently shown.
Layout(self)¶Layout the PyCollapsiblePane.
OnButton(self, event)¶Handles the wx.EVT_BUTTON event for PyCollapsiblePane.
| Parameters: | event – a CommandEventevent to be processed. | 
|---|
OnDrawGTKExpander(self, dc)¶Overridable method to draw the GTK-style expander.
| Parameters: | dc – an instance of wx.DC. | 
|---|
OnDrawGTKStyle(self, event)¶Handles the wx.EVT_PAINT event for PyCollapsiblePane.
| Parameters: | event – a PaintEventevent to be processed. | 
|---|
Note
This is a drawing routine to paint the GTK-style expander.
OnDrawGTKText(self, dc)¶Overridable method to draw the PyCollapsiblePane text in the expander.
| Parameters: | dc – an instance of wx.DC. | 
|---|
OnSize(self, event)¶Handles the wx.EVT_SIZE event for PyCollapsiblePane.
| Parameters: | event – a wx.SizeEventevent to be processed. | 
|---|
OnStateChange(self, sz)¶Handles the status changes (collapsing/expanding).
| Parameters: | sz – an instance of wx.Size. | 
|---|
SetAGWWindowStyleFlag(self, agwStyle)¶Sets the PyCollapsiblePane window style flags.
| Parameters: | agwStyle – the AGW-specific window style. This can be a combination of the
following bits: 
 | 
|---|
SetButton(self, button)¶Assign a new button to PyCollapsiblePane.
| Parameters: | button – can be the standard Buttonor any of the generic
implementations which live inlib.buttons. | 
|---|
SetExpanderDimensions(self, width, height)¶Sets the expander width and height.
| Parameters: | 
 | 
|---|
SetLabel(self, label)¶Sets the button label.
| Parameters: | label – the new button label. | 
|---|
Note
Overridden from Panel.