+ wxSizer *sizerLeft = new wxStaticBoxSizer(box, wxVERTICAL);
+
+ m_chkRight = CreateCheckBoxAndAddToSizer
+ (
+ sizerLeft,
+ _T("&Right aligned"),
+ CheckboxPage_ChkRight
+ );
+
+ sizerLeft->Add(5, 5, 0, wxGROW | wxALL, 5); // spacer
+
+ static const wxString kinds[] =
+ {
+ _T("usual &2-state checkbox"),
+ _T("&3rd state settable by program"),
+ _T("&user-settable 3rd state"),
+ };
+
+ m_radioKind = new wxRadioBox(this, wxID_ANY, _T("&Kind"),
+ wxDefaultPosition, wxDefaultSize,
+ WXSIZEOF(kinds), kinds,
+ 1);
+ sizerLeft->Add(m_radioKind, 0, wxGROW | wxALL, 5);
+ wxButton *btn = new wxButton(this, CheckboxPage_Reset, _T("&Reset"));
+ sizerLeft->Add(btn, 0, wxALIGN_CENTRE_HORIZONTAL | wxALL, 15);
+
+ // middle pane
+ wxStaticBox *box2 = new wxStaticBox(this, wxID_ANY, _T("&Operations"));
+ wxSizer *sizerMiddle = new wxStaticBoxSizer(box2, wxVERTICAL);
+
+ sizerMiddle->Add(CreateSizerWithTextAndButton(CheckboxPage_ChangeLabel,
+ _T("Change label"),
+ wxID_ANY,
+ &m_textLabel),
+ 0, wxALL | wxGROW, 5);
+ sizerMiddle->Add(new wxButton(this, CheckboxPage_Check, _T("&Check it")),
+ 0, wxALL | wxGROW, 5);
+ sizerMiddle->Add(new wxButton(this, CheckboxPage_Uncheck, _T("&Uncheck it")),
+ 0, wxALL | wxGROW, 5);
+ sizerMiddle->Add(new wxButton(this, CheckboxPage_PartCheck,
+ _T("Put in &3rd state")),
+ 0, wxALL | wxGROW, 5);
+
+ // right pane
+ wxSizer *sizerRight = new wxBoxSizer(wxHORIZONTAL);
+ m_checkbox = new wxCheckBox(this, CheckboxPage_Checkbox, _T("&Check me!"));
+ sizerRight->Add(0, 0, 1, wxCENTRE);
+ sizerRight->Add(m_checkbox, 1, wxCENTRE);
+ sizerRight->Add(0, 0, 1, wxCENTRE);
+ sizerRight->SetMinSize(150, 0);
+ m_sizerCheckbox = sizerRight; // save it to modify it later
+
+ // the 3 panes panes compose the window
+ sizerTop->Add(sizerLeft, 0, wxGROW | (wxALL & ~wxLEFT), 10);
+ sizerTop->Add(sizerMiddle, 1, wxGROW | wxALL, 10);
+ sizerTop->Add(sizerRight, 1, wxGROW | (wxALL & ~wxRIGHT), 10);
+
+ // final initializations
+ Reset();