- wxLayoutConstraints *c = new wxLayoutConstraints;
-
- c->top.SameAs (dialog, wxTop, 2);
- c->left.SameAs (dialog, wxLeft, 2);
- c->right.SameAs (dialog, wxRight, 2);
- c->bottom.SameAs (dialog->m_stringText, wxTop, 2);
- dialog->m_listBox->SetConstraints(c);
-
- c = new wxLayoutConstraints;
- c->left.SameAs (dialog, wxLeft, 2);
- c->right.SameAs (dialog, wxRight, 2);
- c->bottom.SameAs (addButton, wxTop, 2);
- c->height.AsIs();
- dialog->m_stringText->SetConstraints(c);
-
- c = new wxLayoutConstraints;
- c->bottom.SameAs (dialog, wxBottom, 2);
- c->left.SameAs (dialog, wxLeft, 2);
- c->width.AsIs();
- c->height.AsIs();
- addButton->SetConstraints(c);
-
- c = new wxLayoutConstraints;
- c->bottom.SameAs (dialog, wxBottom, 2);
- c->left.SameAs (addButton, wxRight, 2);
- c->width.AsIs();
- c->height.AsIs();
- deleteButton->SetConstraints(c);
-
- c = new wxLayoutConstraints;
- c->bottom.SameAs (dialog, wxBottom, 2);
- c->right.SameAs (dialog, wxRight, 2);
- c->width.AsIs();
- c->height.AsIs();
- cancelButton->SetConstraints(c);
-
- c = new wxLayoutConstraints;
- c->bottom.SameAs (dialog, wxBottom, 2);
- c->right.SameAs (cancelButton, wxLeft, 2);
- c->width.AsIs();
- c->height.AsIs();
- okButton->SetConstraints(c);
+ wxBoxSizer *m_bottom_sizer = new wxBoxSizer( wxHORIZONTAL );
+ m_bottom_sizer->Add(addButton, 0, wxALL | wxALIGN_LEFT, 2 );
+ m_bottom_sizer->Add(deleteButton, 0, wxALL | wxALIGN_LEFT, 2 );
+ m_bottom_sizer->Add(1, 1, 1, wxEXPAND | wxALL);
+ m_bottom_sizer->Add(cancelButton, 0, wxALL | wxALIGN_RIGHT, 2 );
+ m_bottom_sizer->Add(okButton, 0, wxALL | wxALIGN_RIGHT, 2 );
+
+ wxBoxSizer *m_sizer = new wxBoxSizer( wxVERTICAL );
+ m_sizer->Add(dialog->m_listBox, 1, wxEXPAND | wxALL, 2 );
+ m_sizer->Add(dialog->m_stringText, 0, wxEXPAND | wxALL, 2 );
+ m_sizer->Add(m_bottom_sizer, 0, wxEXPAND | wxALL , 0 );
+
+ dialog->SetSizer( m_sizer );
+ m_sizer->SetSizeHints( dialog );