Hi! This is a code snippet for the first page (placed inside a wxFrame):
notebook_1 = new wxNotebook(this, -1, wxDefaultPosition, wxDefaultSize, 0);
notebook_1_pane_1 = new wxPanel(notebook_1, -1);
label_1 = new wxStaticText(notebook_1_pane_1, -1, wxT("You can place any window you like here..."));
label_1->SetBackgroundColour(wxColour(50, 50, 204));
label_1->SetForegroundColour(wxColour(255, 255, 255));
label_1->SetFont(wxFont(16, wxDEFAULT, wxNORMAL, wxNORMAL, 0, ""));
notebook_1_pane_1->SetBackgroundColour(wxColour(50, 50, 204));
wxBoxSizer* sizer_1 = new wxBoxSizer(wxVERTICAL);
wxBoxSizer* sizer_2 = new wxBoxSizer(wxHORIZONTAL);
sizer_2->Add(label_1, 0, wxALIGN_CENTER_VERTICAL, 0);
notebook_1_pane_1->SetAutoLayout(true);
notebook_1_pane_1->SetSizer(sizer_2);
sizer_2->Fit(notebook_1_pane_1);
sizer_2->SetSizeHints(notebook_1_pane_1);
sizer_1->Add(new wxNotebookSizer(notebook_1), 1, wxEXPAND, 0);
SetAutoLayout(true);
SetSizer(sizer_1);
sizer_1->Fit(this);
sizer_1->SetSizeHints(this);
Layout();
Have a look at the notebook example and check out the docs.
upCASE ----------------------------------- If it was hard to write, it should be hard to read!- Do. Or do not. There is no try! |