- wxStaticBox *box2 = new wxStaticBox(this, wxID_ANY, _T("&Change labels"));
- wxSizer *sizerMiddle = new wxStaticBoxSizer(box2, wxVERTICAL);
-
- wxSizer *sizerRow;
-
- sizerRow = CreateSizerWithTextAndButton(StaticPage_BoxText,
- _T("Change &box label"),
- wxID_ANY, &m_textBox);
- sizerMiddle->Add(sizerRow, 0, wxGROW | wxALL, 5);
-
- sizerRow = CreateSizerWithTextAndButton(StaticPage_LabelText,
- _T("Change &text label"),
- wxID_ANY, &m_textLabel);
- sizerMiddle->Add(sizerRow, 0, wxGROW | wxALL, 5);
-
- sizerRow = CreateSizerWithTextAndButton(StaticPage_LabelTextWithMarkup,
- _T("Change decorated text label"),
- wxID_ANY, &m_textLabelWithMarkup);
- sizerMiddle->Add(sizerRow, 0, wxGROW | wxALL, 5);
-
+ wxSizer *sizerMiddle = new wxStaticBoxSizer(wxVERTICAL, this,
+ "&Change labels");
+
+ m_textBox = new wxTextCtrl(this, wxID_ANY, wxEmptyString);
+ wxButton *b1 = new wxButton(this, wxID_ANY, "Change &box label");
+ b1->Connect(wxEVT_COMMAND_BUTTON_CLICKED,
+ wxCommandEventHandler(StaticWidgetsPage::OnButtonBoxText),
+ NULL, this);
+ sizerMiddle->Add(m_textBox, 0, wxEXPAND|wxALL, 5);
+ sizerMiddle->Add(b1, 0, wxLEFT|wxBOTTOM, 5);
+
+ m_textLabel = new wxTextCtrl(this, wxID_ANY, wxEmptyString,
+ wxDefaultPosition, wxDefaultSize,
+ wxTE_MULTILINE|wxHSCROLL);
+ wxButton *b2 = new wxButton(this, wxID_ANY, "Change &text label");
+ b2->Connect(wxEVT_COMMAND_BUTTON_CLICKED,
+ wxCommandEventHandler(StaticWidgetsPage::OnButtonLabelText),
+ NULL, this);
+ sizerMiddle->Add(m_textLabel, 0, wxEXPAND|wxALL, 5);
+ sizerMiddle->Add(b2, 0, wxLEFT|wxBOTTOM, 5);
+
+#if wxUSE_MARKUP
+ m_textLabelWithMarkup = new wxTextCtrl(this, wxID_ANY, wxEmptyString,
+ wxDefaultPosition, wxDefaultSize,
+ wxTE_MULTILINE|wxHSCROLL);
+
+ wxButton *b3 = new wxButton(this, wxID_ANY, "Change decorated text label");
+ b3->Connect(wxEVT_COMMAND_BUTTON_CLICKED,
+ wxCommandEventHandler(StaticWidgetsPage::OnButtonLabelWithMarkupText),
+ NULL, this);
+ sizerMiddle->Add(m_textLabelWithMarkup, 0, wxEXPAND|wxALL, 5);
+ sizerMiddle->Add(b3, 0, wxLEFT|wxBOTTOM, 5);
+
+ m_chkGreen = CreateCheckBoxAndAddToSizer(sizerMiddle,
+ "Decorated label on g&reen");
+#endif // wxUSE_MARKUP