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.
^^
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, namely wx.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. ^^
^^
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 (using wx.NotifyEvent.Veto
). ^^
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. |
|
See |
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=””)
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.
GetChoiceCtrl (self)
Returns the choice control used for selecting pages.
GetClassDefaultAttributes
(variant=WINDOW_VARIANT_NORMAL)¶variant (WindowVariant) –
ChoiceCtrl
¶See GetChoiceCtrl