# wxChoicebook Class Reference
[Book Controls]

`#include </home/work/projects/wx/2.9/wx/interface/wx/choicebk.h>`

Inheritance diagram for wxChoicebook:
[legend]

## Detailed Description

wxChoicebook is a class similar to wxNotebook, but uses a wxChoice control to show the labels instead of the tabs.

For usage documentation of this class, please refer to the base abstract class wxBookCtrl. You can also use the Notebook Sample to see wxChoicebook in action.

wxChoicebook allows the use of wxBookCtrlBase::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 wxChoicebook is being employed.

## Styles

This class supports the following styles:

- wxCHB_DEFAULT:
  Choose the default location for the labels depending on the current platform (left everywhere except Mac where it is top).
- wxCHB_TOP:
  Place labels above the page area.
- wxCHB_LEFT:
  Place labels on the left side.
- wxCHB_RIGHT:
  Place labels on the right side.
- wxCHB_BOTTOM:
  Place labels below the page area.

## Events emitted by this class

The following event handler macros redirect the events to member function handlers 'func' with prototypes like:

void handlerFuncName(wxBookCtrlEvent& event)

Event macros for events emitted by this class:

- EVT_CHOICEBOOK_PAGE_CHANGED(id, func):
  The page selection was changed. Processes a `wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGED` event.
- EVT_CHOICEBOOK_PAGE_CHANGING(id, func):
  The page selection is about to be changed. Processes a `wxEVT_COMMAND_CHOICEBOOK_PAGE_CHANGING` event. This event can be vetoed (using wxNotifyEvent::Veto()).

##

Library: wxCore
Category: Book Controls
Appearance:

wxMSW appearance | wxGTK appearance | wxMac appearance

See also:
  wxBookCtrl Overview, wxNotebook, Notebook Sample

## Public Member Functions

wxChoice * | GetChoiceCtrl () const
| Returns the wxChoice associated with the control.
| wxChoicebook ()
| Constructs a choicebook control.
| wxChoicebook (wxWindow *parent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0, const wxString &name=wxEmptyStr)
| Constructs a choicebook control.

List of all members.

## Constructor & Destructor Documentation

wxChoicebook::wxChoicebook | ( |  | ) |

Constructs a choicebook control.

wxChoicebook::wxChoicebook | ( | wxWindow * | parent,
|  | wxWindowID | id,
|  | const wxPoint & | pos = `wxDefaultPosition`,
|  | const wxSize & | size = `wxDefaultSize`,
|  | long | style = `0`,
|  | const wxString & | name = `wxEmptyStr` |
| ) |  |  |

Constructs a choicebook control.

## Member Function Documentation

wxChoice* wxChoicebook::GetChoiceCtrl | ( |  | ) | const

Returns the wxChoice associated with the control.

|  | [ top ]