//1.加入boxSizer19
wxBoxSizer* topSizer = new wxBoxSizer(wxVERTICAL);
this->SetSizer(topSizer);
wxPanel* upPanel = new wxPanel( this, ID_BOT_PANEL2 ,wxDefaultPosition, wxSize(800, 100));
upPanel->SetBackgroundColour(*wxBLACK);//黑色背景
wxPanel* centerPanel = new wxPanel( this, ID_BOT_PANEL3,wxDefaultPosition, wxSize(800, 100) );
centerPanel->SetBackgroundColour(*wxWHITE);//白色背景
wxPanel* bottomPanel = new wxPanel( this, ID_BOT_PANEL4, wxDefaultPosition, wxSize(800, 100));
bottomPanel->SetBackgroundColour(*wxRED);//红色背景
topSizer->Add(upPanel,
1, //垂直方向可拉伸
wxEXPAND| //水平方向自动填充
wxALL, //四周都有边框
10 //边框宽度为10
);
topSizer->Add(centerPanel,0,wxEXPAND);
topSizer->Add(bottomPanel,0,wxEXPAND);