//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);