wx.lib.agw.foldpanelbar.FoldWindowItem¶
This class is a child sibling of the FoldPanelItem
class. It
will contain wx.Window
that can be either a separator (a coloured
line simulated by a wx.Window
) or a wxPython controls (such as a
Button
, a ListCtrl
etc…).
Class Hierarchy¶
Methods Summary¶
Default class constructor |
|
Returns the left indent of |
|
Returns the separator line colour. |
|
Returns the separator line length. |
|
Returns the y position of the separator. |
|
Returns the right indent of |
|
Returns the spacing of |
|
Returns the |
|
Returns space needed by the window if type is |
|
Resizes the element, whatever it is. |
Class API¶
- class FoldWindowItem(object)¶
This class is a child sibling of the
FoldPanelItem
class. It will containwx.Window
that can be either a separator (a coloured line simulated by awx.Window
) or a wxPython controls (such as aButton
, aListCtrl
etc…).
Methods¶
- __init__(self, parent, window=None, \*\*kw)¶
Default class constructor
- Parameters:
parent – the
FoldWindowItem
parent;window – the window contained in this item.
Type – can be “WINDOW” or “SEPARATOR”;
lineColour – the separator colour (meaningful for separators only);
y – the separator y position (meaningful for separators only);
flags – the alignment flags;
spacing – reserves a number of pixels before the window/separator element;
leftSpacing – an indent, in pixels;
rightSpacing – a right spacing, only relevant when the style
FPB_ALIGN_WIDTH
is chosen.
See also
FoldPanelBar.AddFoldPanelWindow()
for a list of valid alignment flags.
- GetLeftSpacing(self)¶
Returns the left indent of
FoldWindowItem
.
- GetLineColour(self)¶
Returns the separator line colour.
- GetLineLength(self)¶
Returns the separator line length.
- GetLineY(self)¶
Returns the y position of the separator.
- GetRightSpacing(self)¶
Returns the right indent of
FoldWindowItem
.
- GetSpacing(self)¶
Returns the spacing of
FoldWindowItem
.
- GetType(self)¶
Returns the
FoldWindowItem
type.
- GetWindowLength(self, vertical=True)¶
Returns space needed by the window if type is
FoldWindowItem
“WINDOW” and returns the total size plus the extra spacing.- Parameters:
vertical –
True
if the parentFoldPanelBar
is in vertical mode.
- ResizeItem(self, size, vertical=True)¶
Resizes the element, whatever it is.
A separator or line will be always aligned by width or height depending on orientation of the whole panel.
- Parameters:
size – the maximum size available for the
FoldWindowItem
;vertical –
True
if the parentFoldPanelBar
is in vertical mode.