An implementation of a notebook control - except that instead of having tabs to show labels, it labels to the right or left (arranged horizontally).
wx.lib.agw.labelbook.FlatBookBase
Default class constructor. |
|
Creates the image container (LabelContainer) class for |
|
Returns the colour for the specified parameter. |
|
Handles the |
|
Sets the colour for the specified parameter. |
LabelBook
(FlatBookBase)¶An implementation of a notebook control - except that instead of having tabs to show labels, it labels to the right or left (arranged horizontally).
__init__
(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0, agwStyle=0, name="LabelBook")¶Default class constructor.
parent – parent window. Must not be None
;
id – window identifier. A value of -1 indicates a default value;
pos – the control position. A value of (-1, -1) indicates a default position, chosen by either the windowing system or wxPython, depending on platform;
size – the control size. A value of (-1, -1) indicates a default size, chosen by either the windowing system or wxPython, depending on platform;
style – the underlying Panel
window style;
agwStyle –
the AGW-specific window style. This can be a combination of the following bits:
Window Styles |
Hex Value |
Description |
---|---|---|
|
0x1 |
Place labels below the page area. Available only for |
|
0x2 |
Place labels on the left side. Available only for |
|
0x4 |
Place labels on the right side. |
|
0x8 |
Place labels above the page area. |
|
0x10 |
Draws a border around |
|
0x20 |
Shows only text labels and no images. Available only for |
|
0x40 |
Shows only tab images and no label texts. Available only for |
|
0x80 |
Displays a pin button to show/hide the book control. |
|
0x100 |
Draw shadows below the book tabs. Available only for |
|
0x200 |
Displays a pin button to show/hide the book control. |
|
0x400 |
Draws a gradient shading on the tabs background. Available only for |
|
0x800 |
On mouse hovering, tabs behave like html hyperlinks. Available only for |
|
0x1000 |
Don’t allow resizing of the tab area. |
|
0x2000 |
Will fit the tab area to the longest text (or text+image if you have images) in all the tabs. |
|
0x4000 |
Show the selected tab text using a bold font. |
name – the window name.
CreateImageContainer
(self)¶Creates the image container (LabelContainer) class for FlatImageBook
.
GetColour
(self, which)¶Returns the colour for the specified parameter.
which – the colour key.
See also
LabelContainer.SetColour()
for a list of valid colour keys.
OnSize
(self, event)¶Handles the wx.EVT_SIZE
event for LabelBook
.
event – a wx.SizeEvent
event to be processed.
SetColour
(self, which, colour)¶Sets the colour for the specified parameter.
which – the colour key;
colour – a valid wx.Colour
instance.
See also
LabelContainer.SetColour()
for a list of valid colour keys.