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 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.
This class supports the following styles:
wx.CHB_DEFAULT
: Choose the default location for the labels depending on the current platform (left everywhere except Mac where it is 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.Handlers bound for the following event types will receive a wx.BookCtrlEvent parameter.
wxEVT_CHOICEBOOK_PAGE_CHANGED
event.wxEVT_CHOICEBOOK_PAGE_CHANGING
event. This event can be vetoed (using wx.NotifyEvent.Veto
).See also
BookCtrl Overview, wx.Notebook, Notebook Sample
__init__ |
Constructs a choicebook control. |
Create |
Create the choicebook control that has already been constructed with the default constructor. |
GetChoiceCtrl |
Returns the wx.Choice associated with the control. |
wx.
Choicebook
(BookCtrlBase)¶Possible constructors:
Choicebook()
Choicebook(parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize,
style=0, name="")
Choicebook is a class similar to Notebook, but uses a Choice control to show the labels instead of the tabs.
__init__
(self, *args, **kw)¶Constructs a choicebook control.
__init__ (self)
__init__ (self, parent, id=ID_ANY, pos=DefaultPosition, size=DefaultSize, style=0, name=””)
Parameters: |
---|
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.
Parameters: | |
---|---|
Return type: | bool |
ChoiceCtrl
¶See GetChoiceCtrl