Package wx :: Class CollapsiblePane

[frames | no frames]

## Type CollapsiblePane

    object --+
             |
        Object --+
                 |
        EvtHandler --+
                     |
                Window --+
                         |
                   Control --+
                             |
                            CollapsiblePane

A collapsable pane is a container with an embedded button-like control which can be used by the user to collapse or expand the pane's contents.

Once constructed you should use the `GetPane` function to access the pane and add your controls inside it (i.e. use the window returned from `GetPane` as the parent for the controls which must go in the pane, NOT the wx.CollapsiblePane itself!).

Note that because of its nature of control which can dynamically (and drastically) change its size at run-time under user-input, when putting a wx.CollapsiblePane inside a `wx.Sizer` you should be careful to add it with a proportion value of zero; this is because otherwise all other windows with non-zero proportion values would automatically get resized each time the user expands or collapses the pane window, usually resulting a weird, flickering effect.

Method Summary
CollapsiblePane | ``__init__`(self, parent, winid, label, pos, size, style, val, name)` Create and show a wx.CollapsiblePane
| ``Collapse`(self, collapse)` Collapses or expands the pane window.
bool | ``Create`(self, parent, id, pos, size, style, validator, name)` Do the 2nd phase and create the GUI control.
| ``Expand`(self)` Same as Collapse(False).
Window | ``GetPane`(self)` Returns a reference to the pane window.
bool | ``IsCollapsed`(self)` Returns `True` if the pane window is currently hidden.
bool | ``IsExpanded`(self)` Returns `True` if the pane window is currently shown.

Property Summary
| `Collapsed`
| `Expanded`
| `thisown`: The membership flag

Instance Method Details

### __init__(self, parent, winid=-1, label=EmptyString, pos=DefaultPosition, size=DefaultSize, style=CP_DEFAULT_STYLE, val=DefaultValidator, name=CollapsiblePaneNameStr)
(Constructor)

Create and show a wx.CollapsiblePane

  Parameters:
    `parent`
    (type=Window)

    `winid`
    (type=int)

    `label`
    (type=String)

    `pos`
    (type=Point)

    `size`
    (type=Size)

    `style`
    (type=long)

    `val`
    (type=Validator)

    `name`
    (type=String)

  Returns:
    CollapsiblePane
  Overrides:
    `wx.Control.__init__`

### Collapse(self, collapse=True)

Collapses or expands the pane window.

  Parameters:
    `collapse`
    (type=bool)

### Create(self, parent, winid=-1, label=EmptyString, pos=DefaultPosition, size=DefaultSize, style=CP_DEFAULT_STYLE, val=DefaultValidator, name=CollapsiblePaneNameStr)

Do the 2nd phase and create the GUI control.

  Parameters:
    `parent`
    (type=Window)

    `id`
    (type=int)

    `pos`
    (type=Point)

    `size`
    (type=Size)

    `style`
    (type=long)

    `validator`
    (type=Validator)

    `name`
    (type=String)

  Returns:
    bool
  Overrides:
    `wx.Control.Create` (inherited documentation)

### Expand(self)

Same as Collapse(False).

### 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.

  Returns:
    Window

### IsCollapsed(self)

Returns `True` if the pane window is currently hidden.

  Returns:
    bool

### IsExpanded(self)

Returns `True` if the pane window is currently shown.

  Returns:
    bool

Property Details

### Collapsed

  Get Method:
    `IsCollapsed`(self)

### Expanded

  Get Method:
    `IsExpanded`(self)

### thisown

The membership flag

Generated by Epydoc 2.1.20050511.rpd on Thu Mar 22 12:13:45 2007 | http://epydoc.sf.net