wx.Choicebook¶
wx.Choicebook is a class similar to wx.Notebook, but uses a wx.Choice control to show the labels instead of the tabs.
For usage documentation of this class, please refer to the base abstract class BookCtrl. You can also use the Notebook Sample to see wx.Choicebook in action.
wx.Choicebook allows the use of wx.BookCtrlBase.GetControlSizer
, allowing a program to add other controls next to the choice control. This is particularly useful when screen space is restricted, as it often is when wx.Choicebook is being employed.
Window Styles¶
This class supports the following styles:
wx.CHB_DEFAULT
: Choose the default location for the labels depending on the current platform (but currently it’s the same everywhere, namelywx.CHB_TOP
).wx.CHB_TOP
: Place labels above the page area.wx.CHB_LEFT
: Place labels on the left side.wx.CHB_RIGHT
: Place labels on the right side.wx.CHB_BOTTOM
: Place labels below the page area.
Events Emitted by this Class¶
Handlers bound for the following event types will receive a wx.BookCtrlEvent parameter.
EVT_CHOICEBOOK_PAGE_CHANGED: The page selection was changed. Processes a
wxEVT_CHOICEBOOK_PAGE_CHANGED
event.EVT_CHOICEBOOK_PAGE_CHANGING: The page selection is about to be changed. Processes a
wxEVT_CHOICEBOOK_PAGE_CHANGING
event. This event can be vetoed (usingwx.NotifyEvent.Veto
).
See also
BookCtrl Overview, wx.Notebook, Notebook Sample
Class Hierarchy¶
Control Appearance¶
Methods Summary¶
Constructs a choicebook control. |
|
Create the choicebook control that has already been constructed with the default constructor. |
|
Returns the wx.Choice associated with the control. |
|
Properties Summary¶
See |
Class API¶
- class wx.Choicebook(BookCtrlBase)¶
Possible constructors:
Choicebook() -> None Choicebook(parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, style=0, name='') -> None
Choicebook is a class similar to Notebook, but uses a Choice control to show the labels instead of the tabs.
Methods¶
- __init__(self, *args, **kw)¶
Constructs a choicebook control.
__init__ (self)
- Return type:
None
__init__ (self, parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, style=0, name=’’)
- Parameters:
- Return type:
None
- Create(self, parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, style=0, name='')¶
Create the choicebook control that has already been constructed with the default constructor.
- GetChoiceCtrl(self, *args, **kw)¶
-
GetChoiceCtrl (self)
Returns the wx.Choice associated with the control.
- Return type:
GetChoiceCtrl (self)
Returns the choice control used for selecting pages.
- Return type:
- static GetClassDefaultAttributes(variant=WINDOW_VARIANT_NORMAL)¶
- Parameters:
variant (WindowVariant)
- Return type:
Properties¶
- ChoiceCtrl¶
See
GetChoiceCtrl