I'm trying to use wxBoxSizer since a few hours now, but I don't work...
The Textbox should be fill my hole panel, but it does not resize.
Here my code (constructor of my panel):
Code: Select all
wxBoxSizer *topsizer = new wxBoxSizer(wxVERTICAL);
wxBoxSizer *button_sizer = new wxBoxSizer(wxHORIZONTAL);
button_sizer->Add(new wxButton( this, idCodeButton, "Code" ),
wxSizerFlags(0).Left().Border(wxALL, 0));
button_sizer->Add(new wxButton( this, idViewButton, "View" ),
wxSizerFlags(0).Left().Border(wxALL, 0));
topsizer->Add(button_sizer, wxSizerFlags(0).Left().Expand().Border(wxALL, 0));
topsizer->Add(m_CodeControl = new wxTextCtrl( this, idCodeControl,
"My text.", wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE),
wxSizerFlags(1).Expand().Left().Border(wxALL, 0));
SetAutoLayout(true);
SetSizer(topsizer);
topsizer->Fit(this);
topsizer->SetSizeHints(this);
Layout();