- wxButton* button = new wxButton(this, TheButton, "Button");
- button->SetName("TheButton");
- Bind(wxEVT_COMMAND_BUTTON_CLICKED, &MyFrame::OnButtonPressed, this, button->GetId());
- Bind(wxEVT_COMMAND_MENU_SELECTED, &MyFrame::OnRunSimulation, this, RunSimulation);
+ wxPanel *panel = new wxPanel(this);
+
+ wxBoxSizer* sizer = new wxBoxSizer(wxVERTICAL);
+ panel->SetSizer(sizer);
+
+ m_button = new wxButton(panel, wxID_ANY, "&Button");
+ sizer->Add(m_button, wxSizerFlags().Centre().Border());
+
+ m_text = new wxTextCtrl(panel, wxID_ANY, "",
+ wxDefaultPosition, wxDefaultSize,
+ wxTE_MULTILINE);
+ sizer->Add(m_text, wxSizerFlags(1).Expand().Border());