WxNotebook
lastmod 2026-11-10created 2015-05-203 edits
wxNotebook is a control in wxWidgets that shows multiple pages and switches between them with tabs. Each page is a child window such as a wxPanel and is added together with a title using AddPage. The tab position can be chosen from top, bottom, left, or right with style flags, and when the page changes, a page-change event is fired that you can handle.
Example
wxBoxSizer * sizer = new wxBoxSizer(wxVERTICAL);
int const kProportion = 1;
int const kBorder = wxSizerFlags::GetDefaultBorder();
notebook = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize);
wxGrid * grid = new wxGrid(notebook, wxID_ANY);
notebook->AddPage(grid, wxT("SVM VECTORS"));
sizer->Add(notebook, kProportion, wxEXPAND | wxALL, kBorder);
SetSizer(sizer);
Center();