Module wx.lib.foldpanelbar
The FoldPanelBar
is a control that contains multiple panels (of type
FoldPanelItem
) that can be expanded or collapsed. The captionbar of
the FoldPanel can be customized by setting it to a horizontal gradient
style, vertical gradient style, a single color, a rectangle or filled
rectangle. The FoldPanel items can be collapsed in place or to the
bottom of the control. wx.Window
derived controls can be added
dynamically, and separated by separator lines. FoldPanelBar is
freeware and distributed under the wxPython license.
The internals of the FoldPanelBar is a list of FoldPanelItem objects. Through
the reference of FoldPanel these panels can be controlled by adding new controls
to a FoldPanel or adding new FoldPanels to the FoldPanelBar.
The CaptionBar fires events to the parent (container of all panel items) when a
sub-panel needs resizing (either folding or expanding). The fold or expand process
is simply a resize of the panel so it looks like all controls on it are gone. All
controls are still child of the FoldPanel they are located on. If they don't
handle the event (and they won't) then the owner of the FoldPanelBar gets the
events. This is what you need to handle the controls. There isn't much to it just
a lot of calculations to see what panel belongs where. There are no sizers
involved in the panels, everything is purely x-y positioning.
- What it can do:
- Run-time addition of panels (no deletion just yet)
- Run time addition of controls to the panel (it will be resized accordingly)
- Creating panels in collapsed mode or expanded mode
- Various modes of caption behaviour and filling to make it more appealing
- Panels can be folded and collapsed (or all of them) to allow more space
What it cannot do:
- Selection of a panel like in a list ctrl
- Dragging and dropping the panels
- Re-ordering the panels (not yet)
Classes |
CaptionBar |
This class is a graphical caption component that consists of a
caption and a clickable arrow. |
CaptionBarEvent |
This event will be sent when a EVT_CAPTIONBAR is mapped in the parent. |
CaptionBarStyle |
This class encapsulates the styles you wish to set for the
CaptionBar (this is the part of the FoldPanel where the caption
is displayed). |
FoldPanelBar |
The FoldPanelBar is a class which can maintain a list of
collapsable panels. |
FoldPanelItem |
This class is a child sibling of the FoldPanelBar class. |
FoldWindowItem |
This class is a child sibling of the FoldPanelItem class. |
Function Summary |
|
GetCollapsedIconBitmap()
|
|
GetCollapsedIconData()
|
|
GetCollapsedIconImage()
|
|
GetExpandedIconBitmap()
|
|
GetExpandedIconData()
|
|
GetExpandedIconImage()
|
CAPTIONBAR_FILLED_RECTANGLE
-
- Type:
-
int
- Value:
|
CAPTIONBAR_GRADIENT_H
-
- Type:
-
int
- Value:
|
CAPTIONBAR_GRADIENT_V
-
- Type:
-
int
- Value:
|
CAPTIONBAR_NOSTYLE
-
- Type:
-
int
- Value:
|
CAPTIONBAR_RECTANGLE
-
- Type:
-
int
- Value:
|
CAPTIONBAR_SINGLE
-
- Type:
-
int
- Value:
|
EVT_CAPTIONBAR
-
- Type:
-
PyEventBinder
- Value:
<wx._core.PyEventBinder object at 0xb490cdec>
|
|
FPB_ALIGN_LEFT
-
- Type:
-
int
- Value:
|
FPB_ALIGN_WIDTH
-
- Type:
-
int
- Value:
|
FPB_BMP_RIGHTSPACE
-
- Type:
-
int
- Value:
|
FPB_COLLAPSE_TO_BOTTOM
-
- Type:
-
int
- Value:
|
FPB_DEFAULT_EXTRASTYLE
-
- Type:
-
int
- Value:
|
FPB_DEFAULT_LEFTLINESPACING
-
- Type:
-
int
- Value:
|
FPB_DEFAULT_LEFTSPACING
-
- Type:
-
int
- Value:
|
FPB_DEFAULT_RIGHTLINESPACING
-
- Type:
-
int
- Value:
|
FPB_DEFAULT_RIGHTSPACING
-
- Type:
-
int
- Value:
|
FPB_DEFAULT_SPACING
-
- Type:
-
int
- Value:
|
FPB_DEFAULT_STYLE
-
- Type:
-
int
- Value:
|
FPB_EXCLUSIVE_FOLD
-
- Type:
-
int
- Value:
|
FPB_EXTRA_X
-
- Type:
-
int
- Value:
|
FPB_EXTRA_Y
-
- Type:
-
int
- Value:
|
FPB_HORIZONTAL
-
- Type:
-
int
- Value:
|
FPB_SINGLE_FOLD
-
- Type:
-
int
- Value:
|
FPB_VERTICAL
-
- Type:
-
int
- Value:
|
wxEVT_CAPTIONBAR
-
- Type:
-
int
- Value:
|