- new wxButton( this, wxID_OK, wxT("OK"), wxPoint(20,200) );
+ wxButton *okButton = new wxButton( panel, wxID_OK, wxT("OK"), wxPoint(20,200) );
+
+ wxBoxSizer *topSizer = new wxBoxSizer( wxVERTICAL );
+ topSizer->Add( button1, 0, wxALL, 5 );
+ topSizer->Add( button2, 0, wxALL, 5 );
+ topSizer->AddSpacer(40);
+ topSizer->Add( okButton, 0, wxALL, 5 );
+
+ panel->SetAutoLayout( true );
+ panel->SetSizer( topSizer );
+ topSizer->Fit(this);