An example for a wxPanel that does what you want (except of the line that is commented out and that redirects debug messages to the wxTextCtrl) is the following:
wxPanel *wxMaximaFrame::CreateLogPane()
{
wxPanel *panel = new wxPanel(this, -1);
wxBoxSizer *vbox = new wxBoxSizer(wxVERTICAL);
wxTextCtrl *textCtrl = new wxTextCtrl(
panel, -1, wxEmptyString, wxDefaultPosition, wxDefaultSize,
wxTE_MULTILINE | wxTE_READONLY | wxHSCROLL);
vbox->Add(textCtrl, wxSizerFlags().Expand().Proportion(10));
panel->SetSizerAndFit(vbox);
// wxLog::SetActiveTarget(new wxLogTextCtrl(textCtrl));
return panel;
}
Kind regards,
Gunter.