Code: Select all
mImageControl = new wxStaticBox(this, wxID_ANY, "Image Control",
wxDefaultPosition, wxDefaultSize, 0, "Image");
wxGridSizer* pGSizer = new wxGridSizer(2, 0, 0); // two columns and no gap
pGSizer->Add(CreateCeilingControl());
// Do this for the three other controls in the grid
// Set the sizer and fit the control
mImageControl->SetSizerAndFit(pGSizer);
Code: Select all
wxBoxSizer* siControlPanel::CreateCeilingControl()
{
wxBoxSizer* mCeilingSizer = new wxBoxSizer(wxVERTICAL);
mCeilingLabel = new wxStaticText(this, wxID_ANY, "Beamform Ceiling",
wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE | wxST_NO_AUTORESIZE);
mCeilingSizer->Add(mCeilingLabel, 0, wxFIXED_MINSIZE | wxALL, 5);
mCeilingSpinner = new wxSpinCtrl(this, wxID_ANY, wxEmptyString,
wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE | wxST_NO_AUTORESIZE);
mCeilingSizer->Add(mCeilingSpinner, 0, wxFIXED_MINSIZE | wxALL, 5);
return mCeilingSizer;
}